dsdb: Fix CID 1034802 Dereference null return value
authorVolker Lendecke <vl@samba.org>
Tue, 23 Jun 2015 12:46:12 +0000 (14:46 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 23 Jun 2015 20:12:09 +0000 (22:12 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/dsdb/samdb/ldb_modules/rootdse.c

index 111266f0350263212c871ea0f697cc19dee3b0eb..f26bc94821966f410bcdfee3a70c7a2c6169d356 100644 (file)
@@ -1178,6 +1178,10 @@ static int rootdse_enable_recycle_bin(struct ldb_module *module,struct ldb_conte
        }
 
        msg = ldb_msg_new(tmp_ctx);
+       if (msg == NULL) {
+               talloc_free(tmp_ctx);
+               return ldb_module_oom(module);
+       }
        msg->dn = ntds_settings_dn;
 
        ldb_msg_add_linearized_dn(msg, "msDS-EnabledFeature", op_feature_msg->dn);