r12016: fixed a valgrind error
authorAndrew Tridgell <tridge@samba.org>
Fri, 2 Dec 2005 11:33:19 +0000 (11:33 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:47:00 +0000 (13:47 -0500)
(This used to be commit 482548031e69ba4bddac999ca9f2cb6ad8359953)

source4/librpc/ndr/ndr_basic.c

index f22e7989bfdf7ce207e1d7a0e4b42ea023b16ba7..615119fad30b3936d11ea6f1b520346d386daa15 100644 (file)
@@ -132,7 +132,7 @@ NTSTATUS ndr_pull_generic_ptr(struct ndr_pull *ndr, uint32_t *v)
 {
        NTSTATUS status;
        status = ndr_pull_uint32(ndr, NDR_SCALARS, v);
-       if (*v != 0) {
+       if (NT_STATUS_IS_OK(status) && *v != 0) {
                ndr->ptr_count++;
        }
        return status;