summaryrefslogtreecommitdiff
path: root/source3/lib/util_str.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util_str.c')
-rw-r--r--source3/lib/util_str.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index f93832e752..449b5d1a60 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -2067,6 +2067,9 @@ void string_append(char **left, const char *right)
if (*left == NULL) {
*left = (char *)SMB_MALLOC(new_len);
+ if (*left == NULL) {
+ return;
+ }
*left[0] = '\0';
} else {
new_len += strlen(*left);