s4:ldb_map_outbound - fix memory leak
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 11 Sep 2009 11:35:55 +0000 (13:35 +0200)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 11 Sep 2009 11:38:29 +0000 (13:38 +0200)
Patch from Andrew Kroeger wasn't fully correct - we need a "talloc_free" after
the "if (ac->r_current == NULL)" statement.

source4/lib/ldb/ldb_map/ldb_map_outbound.c

index 5f5be89976c3056d97b0f179d0888a840f9d5574..6a8e796ca4646d0b5d93c340e07df3a16779c46a 100644 (file)
@@ -1261,6 +1261,8 @@ static int map_remote_search_callback(struct ldb_request *req,
                        return ret;
                }
 
+               talloc_free(ares);
+
                ret = map_search_local(ac);
                if (ret != LDB_SUCCESS) {
                        return ldb_module_done(ac->req, NULL, NULL, ret);