s3-smbd: fix get_ea_names_from_file() and check for pnames pointer.
authorGünther Deschner <gd@samba.org>
Fri, 18 Sep 2009 19:27:55 +0000 (21:27 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 18 Sep 2009 19:31:37 +0000 (21:31 +0200)
This fixes smbd from crashing all the time.

Jeremy, Volker, please check.

Guenther

source3/smbd/trans2.c

index 85eb73749ad443c61bf60e0607b8c383e5ab3696..ce458126d3cc9d9765fc30b0145aacaee0700be1 100644 (file)
@@ -156,7 +156,9 @@ NTSTATUS get_ea_names_from_file(TALLOC_CTX *mem_ctx, connection_struct *conn,
        ssize_t sizeret = -1;
 
        if (!lp_ea_support(SNUM(conn))) {
-               *pnames = NULL;
+               if (pnames) {
+                       *pnames = NULL;
+               }
                *pnum_names = 0;
                return NT_STATUS_OK;
        }