Changeset: 0b73a2a884b1 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0b73a2a884b1 Modified Files: monetdb5/modules/mal/remote.c Branch: Jan2014 Log Message:
Close resource leak. diffs (32 lines): diff --git a/monetdb5/modules/mal/remote.c b/monetdb5/modules/mal/remote.c --- a/monetdb5/modules/mal/remote.c +++ b/monetdb5/modules/mal/remote.c @@ -180,9 +180,13 @@ str RMTconnectScen( "is not supported", *scen); m = mapi_mapiuri(*ouri, *user, *passwd, *scen); - if (mapi_error(m)) - throw(MAL, "remote.connect", "unable to connect to '%s': %s", - *ouri, mapi_error_str(m)); + if (mapi_error(m)) { + msg = createException(MAL, "remote.connect", + "unable to connect to '%s': %s", + *ouri, mapi_error_str(m)); + mapi_destroy(m); + return msg; + } MT_lock_set(&mal_remoteLock, "remote.connect"); @@ -199,8 +203,9 @@ str RMTconnectScen( if (mapi_reconnect(m) != MOK) { MT_lock_unset(&mal_remoteLock, "remote.connect"); - msg = createException(IO, "remote.connect", "unable to connect to '%s': %s", - *ouri, mapi_error_str(m)); + msg = createException(IO, "remote.connect", + "unable to connect to '%s': %s", + *ouri, mapi_error_str(m)); mapi_destroy(m); return msg; } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list