git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
854c5d6
)
don't rely on realloc() working on NULL
author
Andrew Tridgell
<tridge@samba.org>
Sun, 6 Apr 2003 12:28:00 +0000
(12:28 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Sun, 6 Apr 2003 12:28:00 +0000
(12:28 +0000)
(This used to be commit
bd00355c1d5ca4ce77fa28c53ea46834365f22d7
)
source3/lib/charcnv.c
patch
|
blob
|
history
diff --git
a/source3/lib/charcnv.c
b/source3/lib/charcnv.c
index 42cba334839b8b671392b931460c242f16617513..ad39a6e5dc9f8a9c3cc67d7de3dbd40ec11c3d91 100644
(file)
--- a/
source3/lib/charcnv.c
+++ b/
source3/lib/charcnv.c
@@
-214,14
+214,14
@@
size_t convert_string_allocate(charset_t from, charset_t to,
outbuf = NULL;
convert:
destlen = destlen * 2;
- ob = (char *)
r
ealloc(outbuf, destlen);
+ ob = (char *)
R
ealloc(outbuf, destlen);
if (!ob) {
DEBUG(0, ("convert_string_allocate: realloc failed!\n"));
SAFE_FREE(outbuf);
return (size_t)-1;
- }
- else
+ } else {
outbuf = ob;
+ }
i_len = srclen;
o_len = destlen;
retval = smb_iconv(descriptor,