s3: Fix Coverity ID 2202, NULL_RETURNS
authorVolker Lendecke <vl@samba.org>
Wed, 23 Mar 2011 12:11:26 +0000 (13:11 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 23 Mar 2011 11:19:57 +0000 (12:19 +0100)
source3/utils/smbcacls.c

index c7b586a4c0fa1a3a82bc910391fce1fa727ed605..2f5ae857b402cce2f48eaba0c05533d93cb71de1 100644 (file)
@@ -1035,6 +1035,9 @@ static int inherit(struct cli_state *cli, const char *filename,
                        }
                        string_replace(parentname, '/', '\\');
                        parent = get_secdesc(cli,parentname);
+                       if (parent == NULL) {
+                               return EXIT_FAILED;
+                       }
                        for (i=0;i<parent->dacl->num_aces;i++) {
                                struct security_ace *ace=&parent->dacl->aces[i];
                                /* Add inherited flag to all aces */