Re: [Freeipa-devel] [PATCH] Potential memory leaks in ipa-getkeytab

2011-01-14 Thread Simo Sorce
On Thu, 13 Jan 2011 10:42:21 +0100
Martin Kosek  wrote:

> On Wed, 2011-01-12 at 14:40 +0100, Jakub Hrozek wrote:
> > Hash: SHA1
> > 
> > On 01/12/2011 02:25 PM, Martin Kosek wrote:
> > > This patch fixes 2 situations where a pointer to allocated error
> > > string could be overwritten - which could have resulted in
> > > a memory leak.
> > > 
> > > https://fedorahosted.org/freeipa/ticket/714
> > > 
> > 
> > Ack
> 
> Just sending a remainder for this acked patch - it might have got lost
> in yesterday push-spree.

Pushed to master.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] Potential memory leaks in ipa-getkeytab

2011-01-13 Thread Martin Kosek
On Wed, 2011-01-12 at 14:40 +0100, Jakub Hrozek wrote:
> Hash: SHA1
> 
> On 01/12/2011 02:25 PM, Martin Kosek wrote:
> > This patch fixes 2 situations where a pointer to allocated error
> > string could be overwritten - which could have resulted in
> > a memory leak.
> > 
> > https://fedorahosted.org/freeipa/ticket/714
> > 
> 
> Ack

Just sending a remainder for this acked patch - it might have got lost
in yesterday push-spree.

Thanks,
Martin

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] Potential memory leaks in ipa-getkeytab

2011-01-12 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 01/12/2011 02:25 PM, Martin Kosek wrote:
> This patch fixes 2 situations where a pointer to allocated error
> string could be overwritten - which could have resulted in
> a memory leak.
> 
> https://fedorahosted.org/freeipa/ticket/714
> 

Ack
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk0tr2cACgkQHsardTLnvCXpyQCfV0vlZrSjy4R9pcpA6i9cyZZV
Yb4AoI1G72BIAfliQjn+EtH+upMk98bv
=YT7W
-END PGP SIGNATURE-

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH] Potential memory leaks in ipa-getkeytab

2011-01-12 Thread Martin Kosek
This patch fixes 2 situations where a pointer to allocated error
string could be overwritten - which could have resulted in
a memory leak.

https://fedorahosted.org/freeipa/ticket/714

>From f502f98b82ccd51c3fecc363435d661162b9 Mon Sep 17 00:00:00 2001
From: Martin Kosek 
Date: Wed, 12 Jan 2011 14:17:30 +0100
Subject: [PATCH] Potential memory leaks in ipa-getkeytab

This patch fixes 2 situations where a pointer to allocated error
string could be overwritten - which could have resulted in
a memory leak.

https://fedorahosted.org/freeipa/ticket/714
---
 ipa-client/ipa-getkeytab.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/ipa-client/ipa-getkeytab.c b/ipa-client/ipa-getkeytab.c
index 8f108de4a5edb9f353c172a338838e504e842ca5..58ad4375084cfa56de855fe81ab50cbab626fa89 100644
--- a/ipa-client/ipa-getkeytab.c
+++ b/ipa-client/ipa-getkeytab.c
@@ -233,6 +233,7 @@ static int prep_ksdata(krb5_context krbctx, const char *str,
 &similar);
 if (krberr) {
 free_keys_contents(krbctx, keys);
+free(ksdata);
 fprintf(stderr, _("Enctype comparison failed!\n"));
 return 0;
 }
@@ -695,6 +696,7 @@ static int ldap_set_keytab(krb5_context krbctx,
 	ldap_controls_free(srvctrl);
 	ldap_msgfree(res);
 	ldap_unbind_ext(ld, NULL, NULL);
+	free(encs);
 	return kvno;
 
 error_out:
-- 
1.7.3.4

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel