Re: [hatari-devel] Analyse

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Bonsoir Thomas,

Should be false alarm.

~/hatari/src/paths.c
~/hatari/src/paths.c:90:3: Potential leak of memory pointed to by ‘pPathEnv'

I’m not sure of it. My comments in red:

79 /* Get the PATH environment string */
80 pPathEnv = getenv("PATH");
81 if (!pPathEnv)
82 return; // Ok
83 /* Duplicate the string because strtok destroys it later */
84 pPathEnv = strdup(pPathEnv); // Strdup allocates memory enough for duplication (M)
85 if (!pPathEnv)
86 return; // Ok
87
88 pTmpName = malloc(FILENAME_MAX);
99 if (!pTmpName)
90 return; // Routin exits, pPathEnv disappear, memory (M) stay allocated.

perhaps i’m wrong, my knowledge of C is not complete !


~/hatari/src/gui-osx/PrefsController.m
~/hatari/src/gui-osx/PrefsController.m:246:5: Value stored to 'directoryToOpen' is never read
~/hatari/src/gui-osx/PrefsController.m:247:3: Value stored to 'fileToPreselect' is never read
~/hatari/src/gui-osx/PrefsController.m:249:5: Value stored to 'directoryToOpen' is never read

I'll leave these to you or Jerome.
Ok, at this time Jerome is not available, so i’ll see that.
 
A+   (to later in french)





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/