dtcm: Coverity 88871
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 22:45:56 +0000 (23:45 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 22:45:56 +0000 (23:45 +0100)
cde/programs/dtcm/server/lookup.c

index 31b921f3b57f4be493eafbc506c0d3d313d2c7b5..0ac58d102826b6689e8a12cbd511d5e09e4e3991 100644 (file)
@@ -401,9 +401,10 @@ _DtCmsGetEntryAttrByKey(
                }
        }
 
-       if (entry_r)
+       if (entry_r) {
+               free(res);
                stat = _DtCmsGetCmsEntryForClient(entry, entry_r,B_FALSE);
-       else {
+       else {
                if (num_names == 0)
                        stat = _GetAllEntryAttrs(entry, &res->num_attrs,
                                &res->attrs);