summaryrefslogtreecommitdiff
path: root/source3/lib/charcnv.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/charcnv.c')
-rw-r--r--source3/lib/charcnv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index 5863d72f38..32ba97aaa4 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -61,7 +61,10 @@ size_t push_ascii(void *dest, const char *src, size_t dest_len, int flags)
if (!tmpbuf) {
smb_panic("malloc fail");
}
- strupper_m(tmpbuf);
+ if (!strupper_m(tmpbuf)) {
+ SAFE_FREE(tmpbuf);
+ return (size_t)-1;
+ }
src = tmpbuf;
}