commit e5fadfe31ef9826caa7fd6e93be6ee6bd3b62702
parent 841387cf2adee57247b2f28c1c8dd95130375f17
Author: Colin Leroy <colin@colino.net>
Date: Mon, 29 Jun 2009 07:12:24 +0000
2009-06-29 [colin] 3.7.1cvs80
* src/ldapupdate.c
* src/ldif.c
Leak fixes; patch by Pawel Pekala.
Diffstat:
5 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-29 [colin] 3.7.1cvs80
+
+ * src/ldapupdate.c
+ * src/ldif.c
+ Leak fixes; patch by Pawel Pekala.
+
2009-06-26 [colin] 3.7.1cvs79
* src/summaryview.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -3819,3 +3819,4 @@
( cvs diff -u -r 1.395.2.410 -r 1.395.2.411 src/summaryview.c; ) > 3.7.1cvs77.patchset
( cvs diff -u -r 1.395.2.411 -r 1.395.2.412 src/summaryview.c; ) > 3.7.1cvs78.patchset
( cvs diff -u -r 1.395.2.412 -r 1.395.2.413 src/summaryview.c; ) > 3.7.1cvs79.patchset
+( cvs diff -u -r 1.1.2.22 -r 1.1.2.23 src/ldapupdate.c; cvs diff -u -r 1.12.2.20 -r 1.12.2.21 src/ldif.c; ) > 3.7.1cvs80.patchset
diff --git a/configure.ac b/configure.ac
@@ -12,7 +12,7 @@ MINOR_VERSION=7
MICRO_VERSION=1
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=79
+EXTRA_VERSION=80
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/ldapupdate.c b/src/ldapupdate.c
@@ -442,10 +442,11 @@ Rdn *ldapsvr_modify_dn(GHashTable *hash, gchar *dn) {
cm_return_val_if_fail(hash != NULL || dn != NULL, NULL);
pos = g_strstr_len(dn, strlen(dn), "=");
- compare = g_strndup(dn, pos - dn);
-
if (!pos)
return NULL;
+
+ compare = g_strndup(dn, pos - dn);
+
pos++;
rest = g_strstr_len(pos, strlen(pos), ",");
val = g_strndup(pos, rest - pos);
diff --git a/src/ldif.c b/src/ldif.c
@@ -250,8 +250,10 @@ static gchar *ldif_get_line( LdifFile *ldifFile ) {
int i = 0;
int cur_alloc = LDIFBUFSIZE;
- if( feof( ldifFile->file ) )
+ if( feof( ldifFile->file ) ) {
+ g_free(buf);
return NULL;
+ }
while( i < cur_alloc-1 ) {
ch = fgetc( ldifFile->file );