mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 02:35:43 +01:00
topology: fix possible double free in load()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
c9b4293212
commit
88513212c5
1 changed files with 1 additions and 3 deletions
|
@ -100,10 +100,8 @@ static int load(const char *source_file, void **dst, size_t *dst_size)
|
|||
pos += r;
|
||||
size += 8*1024;
|
||||
buf2 = realloc(buf, size);
|
||||
if (buf2 == NULL) {
|
||||
free(buf);
|
||||
if (buf2 == NULL)
|
||||
goto _nomem;
|
||||
}
|
||||
buf = buf2;
|
||||
}
|
||||
if (r < 0) {
|
||||
|
|
Loading…
Reference in a new issue