Skip to content

Commit 6e54bd9

Browse files
committed
target: Only call target->detach if a function is actually defined for that in target_list_free
1 parent 0245f1b commit 6e54bd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)