projects
/
profile
/
ivi
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03b97d0
)
device-restore: Fix use-after-free error.
author
Colin Guthrie
<colin@mageia.org>
Mon, 5 Sep 2011 19:29:36 +0000
(20:29 +0100)
committer
Colin Guthrie
<colin@mageia.org>
Mon, 5 Sep 2011 19:29:36 +0000
(20:29 +0100)
src/modules/module-device-restore.c
patch
|
blob
|
history
diff --git
a/src/modules/module-device-restore.c
b/src/modules/module-device-restore.c
index
54afeb2
..
de98035
100644
(file)
--- a/
src/modules/module-device-restore.c
+++ b/
src/modules/module-device-restore.c
@@
-470,16
+470,19
@@
fail:
pa_tagstruct_free(t);
pa_datum_free(&data);
- pa_xfree(name);
#ifdef ENABLE_LEGACY_DATABASE_ENTRY_FORMAT
/* 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);
+ }
#endif
pa_log_debug("Database contains invalid data for key: %s", name);
+ pa_xfree(name);
+
return NULL;
}