Re: [PATCH] Re: mcedit stackdumps on exit
- From: Leonard den Ottolander <leonard den ottolander nl>
- To: MC Devel <mc-devel gnome org>
- Subject: Re: [PATCH] Re: mcedit stackdumps on exit
- Date: Wed, 22 Jun 2005 13:41:11 +0200
Hello Pavel,
I might need to get enlightened on how the double free actually takes
place. I can't reproduce the warning or crash you describe (FC1, still
:) ). I haven't quite grasped the code path. If I understand your
explanation correctly the first free takes place in clean_dir() and the
second in mc_maybe_editor_or_viewer(). But after the free in clean_dir()
fname gets assigned 0 so I don't quite see how the g_free(path) could
cause a double free condition. But as I said, I don't fully grasp the
code path yet.
Anyway, the cleanup you did seems sensible anyway, so let's discuss the
patch regardless of my understanding of the alleged double free ;) .
On Mon, 2005-06-13 at 15:29, Pavel Tsekov wrote:
> 1) Exports the global variable `edit_one_file'.
What about the other static variables in main.c? Is there any sense in
using static global variables at all?
> 2) The code initializing a dummy `dir_list' entry in setup_dummy_mc() is
> removed.
>
> The argument to setup_dummy_mc() is removed since it is no longer used.
>
> 3) mc_maybe_editor_or_viewer() is rearranged to reflect the changes to
> setup_dummy_mc().
>
> 3) expand_format() is changed so that it will use the `filename' member of
> WEdit if the MC is started as `mcedit'. `mc_get_current_wd' will be
> used to determine the current directory `mcedit' mode instead of
> `panel->cwd'. Finally the code just eats the `u' and `t' format
> specifiers when in `mcedit' mode.
Just a few remarks/questions:
- In the second hunk for src/user.c you test for panel, but that test
seems redundant as in the previous else for edit_one_file != NULL you
assign panel. Shouldn't you skip the test for panel and get the
assignment of fname inside brackets?
- Is the test in the fifth hunk of src/user.c correct? Not totally
grasping that code, but as you test for (!panel) in the 6th hunk (fall
through) I was wondering if the test there shouldn't read (panel &&
!panel->marked).
Leonard.
--
mount -t life -o ro /dev/dna /genetic/research
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]