Re: strippwd patch against CVS20041108

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:
> 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);

Andrew V. Samoilov.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]