summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <anschneider@suse.de>2009-01-16 12:24:58 -0800
committerKarolin Seeger <kseeger@samba.org>2009-01-20 14:16:48 +0100
commit6530d84cc18513b1bfaded4dbd01bd517d7b0831 (patch)
tree2c88661c2d42e07829116e777f0ce8b6d372204b
parent1fef03e814a3d3a73f2bd59b3ded1fd707cf9b93 (diff)
downloadsamba-6530d84cc18513b1bfaded4dbd01bd517d7b0831.tar.gz
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.
(cherry picked from commit 889d0dff4e4cfd4d4b4ed16ad64de303c795f879)
-rw-r--r--source/libsmb/libsmb_path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/libsmb/libsmb_path.c b/source/libsmb/libsmb_path.c
index 2c3a5f8866b..b0970d46db4 100644
--- a/source/libsmb/libsmb_path.c
+++ b/source/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);
}