Re: strippwd patch against CVS20041108
- From: "Andrew V. Samoilov" <andrew email zp ua>
- To: Jindrich Novy <jnovy redhat com>
- Cc: MC Devel <mc-devel gnome org>
- Subject: Re: strippwd patch against CVS20041108
- Date: Thu, 11 Nov 2004 10:27:31 +0200 (EET)
Hello Jindrich,
> About the (add2hotlist_cmd): Eliminate static label_string:
>
> I implemented the label_string to be static in order to your comment #16
> on Red Hat bugzilla:
>
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=131088
>
> where you replied to my question where the label_string is leaked in my
> original implementation of strippwd patch (where label_string is
> g_strdup()ed):
>
> AVS >label_string is leaked if input_dialog() returns NULL or empty
> string.
> AVS >In last case this memory (g_strdup("")) is also leaked.
>
> From the patch I see you reintroduced this. Otherwise please make it
> clear to me.
I added these lines to fix memory leak and to eliminate static buffer:
if (!label || !*label) {
g_free (label_string);
g_free (label);
return;
}
--
Regards,
Andrew V. Samoilov.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]