diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-06-07 14:46:51 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-06-07 21:47:40 +0000 |
commit | 5889d10d10d666aba81d3cf989bb5b9084be97d1 (patch) | |
tree | 85ac3ecdd017c9e32c13eb5f0cd9a4291a772992 /epan/diam_dict.l | |
parent | 1755d74517a7df6c9b1677d5d428202addb77405 (diff) |
Free if the pointer to the item being freed is *non*-null, not if it's null.
Bug: 12497
Change-Id: I282411e36783e735b02b66a024627287767813e2
Reviewed-on: https://code.wireshark.org/review/15773
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/diam_dict.l')
-rw-r--r-- | epan/diam_dict.l | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/diam_dict.l b/epan/diam_dict.l index a82d81c5f2..75a320a69f 100644 --- a/epan/diam_dict.l +++ b/epan/diam_dict.l @@ -863,7 +863,7 @@ ddict_free(ddict_t* d) for (v = d->vendors; v; v = vn) { vn = v->next; - if (!v->desc) g_free(v->desc); + if (v->desc) g_free(v->desc); FREE_NAMEANDOBJ(v); } @@ -874,7 +874,7 @@ ddict_free(ddict_t* d) for (t = d->typedefns; t; t = tn) { tn = t->next; - if (!t->parent) g_free(t->parent); + if (t->parent) g_free(t->parent); FREE_NAMEANDOBJ(t); } @@ -893,9 +893,9 @@ ddict_free(ddict_t* d) FREE_NAMEANDOBJ(e); } - if (!a->vendor) g_free(a->vendor); - if (!a->type) g_free(a->type); - if (!a->description) g_free(a->description); + if (a->vendor) g_free(a->vendor); + if (a->type) g_free(a->type); + if (a->description) g_free(a->description); FREE_NAMEANDOBJ(a); } |