From 42b30e1aa2a134ccd90486b3dc73d1b13a7636a6 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 29 Jun 2009 19:55:34 +0100 Subject: 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... --- src/modules/module-stream-restore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/module-stream-restore.c') 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); -- cgit