Changeset: 7cfa7a25c3f2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/7cfa7a25c3f2
Modified Files:
        sql/backends/monet5/sql_user.c
Branch: userprofile
Log Message:

fix leak


diffs (20 lines):

diff --git a/sql/backends/monet5/sql_user.c b/sql/backends/monet5/sql_user.c
--- a/sql/backends/monet5/sql_user.c
+++ b/sql/backends/monet5/sql_user.c
@@ -536,13 +536,15 @@ monet5_password_hash(mvc *m, const char 
 {
        str msg, hash = NULL;
        oid rid = getUserOIDByName(m, username);
-       const char *password = getUserPassword(m, rid);
+       str password = getUserPassword(m, rid);
        if (password) {
                if ((msg = AUTHdecypherValue(&hash, password)) != MAL_SUCCEED) {
                        (void) sql_error(m, 02, SQLSTATE(42000) 
"monet5_password_hash: %s", getExceptionMessage(msg));
                        freeException(msg);
+                       GDKfree(password);
                }
        }
+       GDKfree(password);
        return hash;
        // (void) mb;
 
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to