Rev 631: return the right pointer in secrets_fetch() in http://samba.org/~tridge/3_0-ctdb

tridge at samba.org tridge at samba.org
Mon Sep 24 00:02:08 GMT 2007


------------------------------------------------------------
revno: 631
revision-id: tridge at samba.org-20070924000207-uw1i6lqnu2zersxp
parent: tridge at samba.org-20070924000139-qa0k1drb292t6uoy
committer: Andrew Tridgell <tridge at samba.org>
branch nick: s3-ctdb-tridge
timestamp: Mon 2007-09-24 10:02:07 +1000
message:
  return the right pointer in secrets_fetch()
modified:
  source/passdb/secrets.c        secrets.c-20070210173807-1wjifrbwaz6xnmgl-782
=== modified file 'source/passdb/secrets.c'
--- a/source/passdb/secrets.c	2007-09-21 06:04:56 +0000
+++ b/source/passdb/secrets.c	2007-09-24 00:02:07 +0000
@@ -152,11 +152,11 @@
 	}
 	if (size)
 		*size = dbuf.dsize;
-	if (!(result = memdup(dbuf.dptr, dbuf.dsize))) {
-		TALLOC_FREE(dbuf.dptr);
-		return NULL;
-	}
-	return dbuf.dptr;
+
+	result = memdup(dbuf.dptr, dbuf.dsize);
+
+	TALLOC_FREE(dbuf.dptr);
+	return result;
 }
 
 /* store a secrets entry 



More information about the samba-cvs mailing list