Skip to content

Commit

Permalink
sound:portaudio: Fix a use after free / double free
Browse files Browse the repository at this point in the history
An error cleanup missed an item.

Signed-off-by: Corey Minyard <[email protected]>
  • Loading branch information
cminyard committed Sep 9, 2024
1 parent 5732bda commit 61b0f17
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/portaudio_sound.h
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,10 @@ gensio_sound_pa_api_setup(struct gensio_pparm_info *p,
o->free(o, si->cardname);
si->cardname = NULL;
}
if (w)
if (w) {
si->pinfo = NULL;
o->free(o, w);
}
Pa_Terminate();
return err;
}
Expand Down

0 comments on commit 61b0f17

Please sign in to comment.