diff options
author | Vinson Lee <vlee@vmware.com> | 2009-11-08 01:17:26 -0800 |
---|---|---|
committer | Vinson Lee <vlee@vmware.com> | 2009-11-08 01:17:26 -0800 |
commit | d13aa4b4c56587bacecb3a4c9bae5ca2ad5e0285 (patch) | |
tree | 5e6f1410b9389a99ef847c3879b2bc6d25a9064f /src | |
parent | 6d9f6da035eea005bdebd622941bba2d564cbfa1 (diff) |
occluqry: Fix memory leak when malloc fails.
Diffstat (limited to 'src')
-rw-r--r-- | src/glean/toccluqry.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glean/toccluqry.cpp b/src/glean/toccluqry.cpp index 4d49045..17dbd3f 100644 --- a/src/glean/toccluqry.cpp +++ b/src/glean/toccluqry.cpp @@ -526,6 +526,10 @@ bool OccluQryTest::conformOQ_Gen_Delete(unsigned int id_n) if (!ids1 || !ids2) { fprintf(stderr, "F: Cannot alloc memory to pointer ids[12].\n"); + if (ids1) + free(ids1); + if (ids2) + free(ids2); return false; } |