2001-08-19 Lutz M�ller <urc8@rz.uni-karlsruhe.de>
* libgphoto2/filesys.c (gp_filesystem_format): Fix bug found by
St�phane Castejon.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2012 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2001-08-19 Lutz Müller <urc8@rz.uni-karlsruhe.de>
|
||||
|
||||
* libgphoto2/filesys.c (gp_filesystem_format): Fix bug found by
|
||||
Stéphane Castejon.
|
||||
|
||||
2001-08-19 Lutz Müller <urc8@rz.uni-karlsruhe.de>
|
||||
|
||||
* libgphoto2/globals.h: Unused. Removed.
|
||||
|
||||
@@ -330,15 +330,16 @@ gp_filesystem_format (CameraFilesystem *fs)
|
||||
{
|
||||
int x, y;
|
||||
|
||||
if (fs->folder) {
|
||||
for (x = 0; x < fs->count; x++) {
|
||||
for (y=0; y<fs->folder[x]->count; y++)
|
||||
free (fs->folder[x]->file[y]);
|
||||
free (fs->folder[x]);
|
||||
}
|
||||
free (fs->folder);
|
||||
}
|
||||
fs->count = 0;
|
||||
if (!fs)
|
||||
return (GP_ERROR_BAD_PARAMETERS);
|
||||
|
||||
for (x = 0; x < fs->count; x++) {
|
||||
for (y = 0; y < fs->folder[x]->count; y++)
|
||||
free (fs->folder[x]->file[y]);
|
||||
free (fs->folder[x]);
|
||||
}
|
||||
free (fs->folder);
|
||||
fs->count = 0;
|
||||
|
||||
return (GP_OK);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user