summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <anschneider@suse.de>2009-01-16 12:26:46 -0800
committerJeremy Allison <jra@samba.org>2009-01-16 12:26:46 -0800
commit3fe974c4feed33187294a0cb922c20f7dbfeaf43 (patch)
treec1dbba97436880030e3b333f02e235373a8ed84c
parentd03133e696aea45e0843f4d72d2d1449366ac4e2 (diff)
downloadsamba-3fe974c4feed33187294a0cb922c20f7dbfeaf43.tar.gz
samba-3fe974c4feed33187294a0cb922c20f7dbfeaf43.tar.bz2
samba-3fe974c4feed33187294a0cb922c20f7dbfeaf43.zip
Fix a segfault if ? is there but the options are NULL. This is the case if SMBC_parse_path is called by SMBC_stat_ctx.
-rw-r--r--source3/libsmb/libsmb_path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libsmb/libsmb_path.c b/source3/libsmb/libsmb_path.c
index 2c3a5f8866..b0970d46db 100644
--- a/source3/libsmb/libsmb_path.c
+++ b/source3/libsmb/libsmb_path.c
@@ -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);
}