|
From: Daniel J S. <dan...@ie...> - 2004-10-03 19:50:09
|
Ethan Merritt wrote:
>On Saturday 02 October 2004 05:43 pm, Daniel J Sebald wrote:
>
>
>
>>PS: There may be another potential minor leak, but I don't think it
>>happens by default. This bit of code:
>> if (!cmd_tried)
>> cmd = getMultiTabConsoleSwitchCommand(&newGnuplotXID);
>> if (cmd) system(cmd);
>>
>>
>
>That's part of something that Petr added in Dec 2003.
>I don't understand what it's for, even after reading the code and
>the comments.
>
>(And what is a "multitab console" anyhow? I use KDE on all my
>machines, but I have no idea what piece or feature of the KDE
>desktop this code affects).
>
>It does seem that the code above should be changed to
> if (cmd) {
> system(cmd);
> free(cmd);
> }
>
>
Or, if the code should just check for the command once, under the
assumption that if it tries again it'll just get the same thing, then:
if (!cmd_tried) {
cmd = getMultiTabConsoleSwitchCommand(&newGnuplotXID);
cmd_tried = 1; /* or TRUE, or something */
}
|