diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2006-09-24 17:41:25 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2006-09-24 17:41:25 +0000 |
commit | 37beaf51083a857d5d60f042ced13093f5590c80 (patch) | |
tree | 677d44c9cccd4439f823506bfad3ad2afe7cffe6 /hcid/dbus-common.c | |
parent | 06729a5ffd58dac9d0573682b190384c1710ec89 (diff) |
Don't call free for a potential NULL pointer
Diffstat (limited to 'hcid/dbus-common.c')
-rw-r--r-- | hcid/dbus-common.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); } |