44 lines
1.4 KiB
Diff
44 lines
1.4 KiB
Diff
|
From ac102092fe08183f916e6115fb6fef0f0a792126 Mon Sep 17 00:00:00 2001
|
||
|
From: Jan Zeleny <jzeleny@redhat.com>
|
||
|
Date: Mon, 14 May 2012 04:11:32 -0400
|
||
|
Subject: [PATCH 04/19] Fixed two minor memory leaks
|
||
|
|
||
|
---
|
||
|
src/providers/ldap/sdap.c | 5 ++++-
|
||
|
src/providers/ldap/sdap_range.c | 3 ++-
|
||
|
2 files changed, 6 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c
|
||
|
index 1bb513ae639c37c64cd0064066f7c69552404671..01ba418a6e50808552845f6e91db448c57adbb83 100644
|
||
|
--- a/src/providers/ldap/sdap.c
|
||
|
+++ b/src/providers/ldap/sdap.c
|
||
|
@@ -123,7 +123,10 @@ int sdap_parse_entry(TALLOC_CTX *memctx,
|
||
|
}
|
||
|
|
||
|
attrs = sysdb_new_attrs(tmp_ctx);
|
||
|
- if (!attrs) return ENOMEM;
|
||
|
+ if (!attrs) {
|
||
|
+ ret = ENOMEM;
|
||
|
+ goto done;
|
||
|
+ }
|
||
|
|
||
|
str = ldap_get_dn(sh->ldap, sm->msg);
|
||
|
if (!str) {
|
||
|
diff --git a/src/providers/ldap/sdap_range.c b/src/providers/ldap/sdap_range.c
|
||
|
index 295b6605d15a83b7994bb440e3942f5f620cbeaf..a26443c8244bc58e609b2d9c6b4a2ded71193725 100644
|
||
|
--- a/src/providers/ldap/sdap_range.c
|
||
|
+++ b/src/providers/ldap/sdap_range.c
|
||
|
@@ -104,7 +104,8 @@ errno_t sdap_parse_range(TALLOC_CTX *mem_ctx,
|
||
|
DEBUG(SSSDBG_TRACE_LIBS,
|
||
|
("[%s] contained the last set of values for this attribute\n",
|
||
|
attr_desc));
|
||
|
- return EOK;
|
||
|
+ ret = EOK;
|
||
|
+ goto done;
|
||
|
}
|
||
|
|
||
|
*range_offset = strtouint32(end_range, &endptr, 10);
|
||
|
--
|
||
|
1.7.10.1
|
||
|
|