diff options
Diffstat (limited to 'source4/heimdal/lib/roken/strpool.c')
-rw-r--r-- | source4/heimdal/lib/roken/strpool.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/heimdal/lib/roken/strpool.c b/source4/heimdal/lib/roken/strpool.c index dc56892144..642d335dec 100644 --- a/source4/heimdal/lib/roken/strpool.c +++ b/source4/heimdal/lib/roken/strpool.c @@ -100,7 +100,10 @@ rk_strpoolprintf(struct rk_strpool *p, const char *fmt, ...) char * ROKEN_LIB_FUNCTION rk_strpoolcollect(struct rk_strpool *p) { - char *str = p->str; + char *str; + if (p == NULL) + return strdup(""); + str = p->str; p->str = NULL; free(p); return str; |