Use TALLOC_FREE in talloc_pop()
[sfrench/samba-autobuild/.git] / lib / util / talloc_stack.c
index c11a88dda59ec36e13538f0ec6f63028d0f999d9..8e559cc20f414415437f43b60090880dc0f46056 100644 (file)
@@ -100,8 +100,7 @@ static int talloc_pop(TALLOC_CTX *frame)
                if (frame == ts->talloc_stack[i]) {
                        break;
                }
-               talloc_free(ts->talloc_stack[i]);
-               ts->talloc_stack[i] = NULL;
+               TALLOC_FREE(ts->talloc_stack[i]);
        }
 
        ts->talloc_stack[i] = NULL;