diff options
author | Guillem Jover <guillem.jover@nokia.com> | 2009-02-21 11:43:15 +0100 |
---|---|---|
committer | Danny Kukawka <danny.kukawka@web.de> | 2009-02-21 11:43:15 +0100 |
commit | 92e7f2e8b2a1a36d3ec2b371424719e7078d91da (patch) | |
tree | 3eb0cc3be2aeb6538fdf2b6d92f338cf8ce3e7cc /libhal | |
parent | 0b50c9561267f78ce7af24eaee690e0b4dffb0eb (diff) |
do not leak on error conditions
Fixed leaks on error conditions.
Diffstat (limited to 'libhal')
-rw-r--r-- | libhal/libhal.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libhal/libhal.c b/libhal/libhal.c index 08c5481e..855b9dc1 100644 --- a/libhal/libhal.c +++ b/libhal/libhal.c @@ -476,8 +476,10 @@ get_property_set (DBusMessageIter *iter) p->type = (LibHalPropertyType) dbus_message_iter_get_arg_type (&var_iter); - if(!libhal_property_fill_value_from_variant (p, &var_iter)) + if (!libhal_property_fill_value_from_variant (p, &var_iter)) { + free (p); goto oom; + } HASH_ADD_KEYPTR (hh, result->properties, p->key, strlen (p->key), p); |