svn commit: samba r10467 - in
branches/SAMBA_4_0/source/lib/tdb/common: .
tridge at samba.org
tridge at samba.org
Sat Sep 24 05:02:03 GMT 2005
Author: tridge
Date: 2005-09-24 05:02:02 +0000 (Sat, 24 Sep 2005)
New Revision: 10467
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10467
Log:
aix doesn't like zero length malloc :(
Modified:
branches/SAMBA_4_0/source/lib/tdb/common/io.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/tdb/common/io.c
===================================================================
--- branches/SAMBA_4_0/source/lib/tdb/common/io.c 2005-09-24 04:56:51 UTC (rev 10466)
+++ branches/SAMBA_4_0/source/lib/tdb/common/io.c 2005-09-24 05:02:02 UTC (rev 10467)
@@ -351,6 +351,11 @@
{
unsigned char *buf;
+ /* some systems don't like zero length malloc */
+ if (len == 0) {
+ len = 1;
+ }
+
if (!(buf = malloc(len))) {
/* Ensure ecode is set for log fn. */
tdb->ecode = TDB_ERR_OOM;
More information about the samba-cvs
mailing list