diff options
author | Petr Machata <pmachata@redhat.com> | 2012-10-30 00:26:21 +0100 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-10-30 00:26:21 +0100 |
commit | 635786d16da4cb3665ceb82bdb000331c9a8febd (patch) | |
tree | fe6c29635474ede696e6276a73a185508c6d27bc /value.c | |
parent | bc58f2a1b2b516b2176a4a32117065dde4813734 (diff) | |
download | ltrace-635786d16da4cb3665ceb82bdb000331c9a8febd.tar.gz |
Also free memory associated with value type, if owned
This plugs a leak.
Diffstat (limited to 'value.c')
-rw-r--r-- | value.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -60,8 +60,10 @@ value_init_detached(struct value *valp, struct value *parent, void value_set_type(struct value *value, struct arg_type_info *type, int own_type) { - if (value->own_type) + if (value->own_type) { type_destroy(value->type); + free(value->type); + } value->type = type; value->own_type = own_type; } |