Changeset: fa4d466d9432 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fa4d466d9432
Modified Files:
sql/backends/monet5/wlr.c
Branch: linear-hashing
Log Message:
Fix memory leak detected by Coverity
diffs (22 lines):
diff --git a/sql/backends/monet5/wlr.c b/sql/backends/monet5/wlr.c
--- a/sql/backends/monet5/wlr.c
+++ b/sql/backends/monet5/wlr.c
@@ -184,6 +184,7 @@ WLRgetMaster(void)
int len;
str dir;
FILE *fd;
+ str msg = MAL_SUCCEED;
if( wlr_master[0] == 0 )
return MAL_SUCCEED;
@@ -198,7 +199,9 @@ WLRgetMaster(void)
fd = fopen(dir,"r");
GDKfree(dir);
if( fd ){
- WLCreadConfig(fd);
+ msg = WLCreadConfig(fd);
+ if( msg != MAL_SUCCEED)
+ return msg;
if( ! wlr_master[0] )
throw(MAL,"wlr.getMaster","Master not identified\n");
wlc_state = WLC_CLONE; // not used as master
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list