Skip to content

Commit

Permalink
fix: Memory leak in target.c
Browse files Browse the repository at this point in the history
  • Loading branch information
matricali committed Aug 16, 2024
1 parent 959c70c commit 4fc2949
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ void btkg_target_list_append_range(btkg_target_list_t *target_list,
}
target->port = port;
btkg_target_list_append(target_list, target);
free(target);
return;
}

Expand All @@ -236,6 +237,7 @@ void btkg_target_list_append_range(btkg_target_list_t *target_list,
}
new_target->port = port;
btkg_target_list_append(target_list, new_target);
free(new_target);
}
}

Expand Down

0 comments on commit 4fc2949

Please sign in to comment.