From 37beaf51083a857d5d60f042ced13093f5590c80 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sun, 24 Sep 2006 17:41:25 +0000 Subject: Don't call free for a potential NULL pointer --- hcid/dbus-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hcid/dbus-common.c b/hcid/dbus-common.c index 9b60b8dd..e4278330 100644 --- a/hcid/dbus-common.c +++ b/hcid/dbus-common.c @@ -87,7 +87,9 @@ static void name_data_free(struct name_data *data) slist_free(data->callbacks); - free(data->name); + if (data->name) + free(data->name); + free(data); } -- cgit