mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
device-restore: Fix use-after-free error.
This commit is contained in:
parent
03b97d0e08
commit
8e298848be
1 changed files with 5 additions and 2 deletions
|
|
@ -470,16 +470,19 @@ fail:
|
||||||
pa_tagstruct_free(t);
|
pa_tagstruct_free(t);
|
||||||
|
|
||||||
pa_datum_free(&data);
|
pa_datum_free(&data);
|
||||||
pa_xfree(name);
|
|
||||||
|
|
||||||
#ifdef ENABLE_LEGACY_DATABASE_ENTRY_FORMAT
|
#ifdef ENABLE_LEGACY_DATABASE_ENTRY_FORMAT
|
||||||
/* Try again with a null port. This is used when dealing with migration from older versions */
|
/* Try again with a null port. This is used when dealing with migration from older versions */
|
||||||
if (port)
|
if (port) {
|
||||||
|
pa_xfree(name);
|
||||||
return perportentry_read(u, basekeyname, NULL);
|
return perportentry_read(u, basekeyname, NULL);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pa_log_debug("Database contains invalid data for key: %s", name);
|
pa_log_debug("Database contains invalid data for key: %s", name);
|
||||||
|
|
||||||
|
pa_xfree(name);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue