Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit 57e99eb

Browse files
committed
target: Only call target->detach if a function is actually defined for that in target_list_free
1 parent fcdc38a commit 57e99eb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/target/target.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void target_list_free(void)
127127
while (target) {
128128
target_s *next_target = target->next;
129129
TRY (EXCEPTION_ALL) {
130-
if (target->attached)
130+
if (target->attached && target->detach)
131131
target->detach(target);
132132
}
133133
CATCH () {

0 commit comments

Comments
 (0)