Fix a segfault if ? is there but the options are NULL. This is the case if SMBC_parse...
authorAndreas Schneider <anschneider@suse.de>
Fri, 16 Jan 2009 20:26:46 +0000 (12:26 -0800)
committerJeremy Allison <jra@samba.org>
Fri, 16 Jan 2009 20:26:46 +0000 (12:26 -0800)
source3/libsmb/libsmb_path.c

index 2c3a5f8866b6005c6891f6fc5d79402802788981..b0970d46db49f6475be60f4312175cfcac511f32 100644 (file)
@@ -286,7 +286,7 @@ SMBC_parse_path(TALLOC_CTX *ctx,
                 DEBUG(4, ("Found options '%s'", q));
                 
                /* Copy the options */
-               if (*pp_options != NULL) {
+               if (pp_options && *pp_options != NULL) {
                        TALLOC_FREE(*pp_options);
                        *pp_options = talloc_strdup(ctx, q);
                }