[fedfs-utils] [PATCH 8/9] libnsdb: Use ber_memfree(3) where needed
Chuck Lever
chuck.lever at oracle.com
Mon Oct 29 10:35:39 PDT 2012
In nsdb_construct_fsl_dn(), ber_memalloc(3) is used to allocate
some memory. ber_memfree(3) should be used to release it. This
oversight is probably harmless, because ber_memfree(3) is typically
a simple wrapper around free(3).
Signed-off-by: Chuck Lever <chuck.lever at oracle.com>
---
src/libnsdb/administrator.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/libnsdb/administrator.c b/src/libnsdb/administrator.c
index 23f38d9..1b46360 100644
--- a/src/libnsdb/administrator.c
+++ b/src/libnsdb/administrator.c
@@ -498,7 +498,7 @@ nsdb_construct_fsl_dn(const char *nce, const char *fsn_uuid, const char *fsl_uui
fsl_uuid, fsn_uuid, nce);
if (len < 0 || (size_t)len > dn_len) {
xlog(D_GENERAL, "%s: DN is too long", __func__);
- free(dn);
+ ber_memfree(dn);
return NULL;
}
More information about the fedfs-utils-devel
mailing list