Skip to content

Commit

Permalink
properly release role_ref
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixKratz committed Feb 14, 2022
1 parent 170abd8 commit 689d5ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ax.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ bool ax_get_selected_element(struct ax* ax) {
// free(role);
}

if (role_ref) CFRelease(role_ref);

if (!role) {
if (role_ref) CFRelease(role_ref);
CFRelease(selected_element);
selected_element = NULL;
}
Expand Down

0 comments on commit 689d5ba

Please sign in to comment.