Changeset: 005af7309001 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/005af7309001
Modified Files:
        monetdb5/mal/mal_authorize.c
Branch: default
Log Message:

Allocation check


diffs (13 lines):

diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -541,7 +541,8 @@ AUTHaddUser(oid *uid, Client cntxt, cons
        if (!GDKembedded()) {
                rethrow("addUser", tmp, AUTHcypherValue(&hash, passwd));
        } else {
-               hash = GDKstrdup("hash");
+               if (!(hash = GDKstrdup("hash")))
+                       throw(MAL, "addUser", SQLSTATE(HY013) MAL_MALLOC_FAIL);
        }
        /* needs force, as SQL makes a view over user */
        if (BUNappend(user, username, true) != GDK_SUCCEED ||
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to