summaryrefslogtreecommitdiffstats
path: root/src/modules/module-stream-restore.c
diff options
context:
space:
mode:
authorColin Guthrie <cguthrie@mandriva.org>2009-06-29 19:55:34 +0100
committerColin Guthrie <cguthrie@mandriva.org>2009-10-01 09:08:28 +0100
commit42b30e1aa2a134ccd90486b3dc73d1b13a7636a6 (patch)
tree11012d6e7bc2ebba26f25252f9cff636c4f98c1c /src/modules/module-stream-restore.c
parent64979385e09ba0a411669f9feeea56c93bf14d38 (diff)
stream-restore: Preventative initialistion to NULL
There is not technically a bug here due to the early return and the knowledge that one of the if blocks will definitely be run, but this makes sure we don't call free on uninitialised data or do anything else suitibly daft. Also helps when you copy the code and change it slightly and don't realise you've left things open...
Diffstat (limited to 'src/modules/module-stream-restore.c')
-rw-r--r--src/modules/module-stream-restore.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c
index 9b6f9143..b7b36be4 100644
--- a/src/modules/module-stream-restore.c
+++ b/src/modules/module-stream-restore.c
@@ -281,8 +281,8 @@ static pa_bool_t entries_equal(const struct entry *a, const struct entry *b) {
static void subscribe_callback(pa_core *c, pa_subscription_event_type_t t, uint32_t idx, void *userdata) {
struct userdata *u = userdata;
- struct entry entry, *old;
- char *name;
+ struct entry entry, *old = NULL;
+ char *name = NULL;
pa_datum key, data;
pa_assert(c);