Changeset: c796dd791530 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c796dd791530
Modified Files:
monetdb5/modules/mal/clients.c
Branch: Oct2012
Log Message:
Only release when there is something to release.
Found by coverity.
diffs (14 lines):
diff --git a/monetdb5/modules/mal/clients.c b/monetdb5/modules/mal/clients.c
--- a/monetdb5/modules/mal/clients.c
+++ b/monetdb5/modules/mal/clients.c
@@ -145,8 +145,8 @@ CLTInfo(Client cntxt, MalBlkPtr mb, MalS
(void) mb;
if (b == 0 || bn == 0){
- if ( b == 0) BBPreleaseref(b->batCacheid);
- if ( bn == 0) BBPreleaseref(bn->batCacheid);
+ if ( b != 0) BBPreleaseref(b->batCacheid);
+ if ( bn != 0) BBPreleaseref(bn->batCacheid);
throw(MAL, "clients.info", MAL_MALLOC_FAIL);
}
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list