summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/charcnv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index 7acb7147fd..c3360bbb65 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -252,7 +252,7 @@ convert:
destlen = destlen - o_len;
*dest = (char *)Realloc(ob,destlen);
- if (!*dest) {
+ if (destlen && !*dest) {
DEBUG(0, ("convert_string_allocate: out of memory!\n"));
SAFE_FREE(ob);
return (size_t)-1;