Add a check for success of fetch_reg_values().
authorMichael Adam <obnox@samba.org>
Mon, 18 Feb 2008 16:23:41 +0000 (17:23 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 18 Feb 2008 16:41:19 +0000 (17:41 +0100)
Michael

source/services/services_db.c

index 37440a299f781ccb0a64d2175b7b8276c48906ab..89095c628d5275b4c52710dda4a557258160d869 100644 (file)
@@ -531,7 +531,11 @@ SEC_DESC *svcctl_get_secdesc( TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN *
                return NULL;
        }
 
-       fetch_reg_values( key, values );
+       if (fetch_reg_values( key, values ) == -1) {
+               DEBUG(0, ("Error getting registry values\n"));
+               TALLOC_FREE(key);
+               return NULL;
+       }
 
        TALLOC_FREE(key);