Plug memory leak in verify_row()
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 26 Oct 2011 19:12:19 +0000 (21:12 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 29 Dec 2011 10:47:04 +0000 (11:47 +0100)
Leak introduced in commit b30c83cd, v4.3.28.

src/lib/common/ef_verify.c

index e886eb942ee7bb1b5dd877a76a1d5bd561c9c12c..5325db6e79760f615ffc27a2021354e8224ffcb3 100644 (file)
@@ -158,7 +158,7 @@ verify_row(int type, int row)
     }
 
     if (!empobj_in_use(type, row_ref))
-       return ret_val;
+       goto out;
 
     for (i = 0; ca[i].ca_name; ++i) {
        if (ca[i].ca_get)
@@ -188,6 +188,8 @@ verify_row(int type, int row)
            }
        } while (++j < n);
     }
+
+out:
     if (!(flags & EFF_MEM))
        free(row_ref);
     return ret_val;