Fix a talloc/malloc screwup in file_lines_pload
authorVolker Lendecke <vl@samba.org>
Thu, 26 Mar 2009 13:54:18 +0000 (14:54 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 26 Mar 2009 13:58:38 +0000 (14:58 +0100)
Another bug due to careless merge to /lib :-(((

Volker

source3/lib/util_file.c

index c5a9b7c29afdf59a52ddb711f5ee5f676ee79e99..50ff844762446e462452d23df56bc5b94d4a05a8 100644 (file)
@@ -39,7 +39,7 @@ static char *file_pload(const char *syscmd, size_t *size)
        total = 0;
 
        while ((n = read(fd, buf, sizeof(buf))) > 0) {
-               p = (char *)SMB_REALLOC(p, total + n + 1);
+               p = talloc_realloc(NULL, p, char, total + n + 1);
                if (!p) {
                        DEBUG(0,("file_pload: failed to expand buffer!\n"));
                        close(fd);