1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-14 12:59:07 +03:00

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.

This commit is contained in:
Andreas Schneider
2009-01-16 12:26:46 -08:00
committed by Jeremy Allison
parent d03133e696
commit 3fe974c4fe

View 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);
}