Remove more memory leaks caught by valgrind.

This commit is contained in:
rocky
2004-03-20 22:46:56 +00:00
parent 0643636d06
commit fb040eada5
9 changed files with 66 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
/*
$Id: bincue.c,v 1.7 2004/03/20 21:54:38 rocky Exp $
$Id: bincue.c,v 1.8 2004/03/20 22:46:57 rocky Exp $
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2002, 2003, 2004 Rocky Bernstein <rocky@panix.com>
@@ -24,7 +24,7 @@
(*.cue).
*/
static const char _rcsid[] = "$Id: bincue.c,v 1.7 2004/03/20 21:54:38 rocky Exp $";
static const char _rcsid[] = "$Id: bincue.c,v 1.8 2004/03/20 22:46:57 rocky Exp $";
#include "cdio_assert.h"
#include "cdio_private.h"
@@ -736,7 +736,7 @@ cdio_get_default_device_bincue(void)
{
char **drives = cdio_get_devices_nrg();
char *drive = (drives[0] == NULL) ? NULL : strdup(drives[0]);
cdio_free_device_list(&drives);
cdio_free_device_list(drives);
return drive;
}

View File

@@ -1,5 +1,5 @@
/*
$Id: nrg.c,v 1.3 2004/03/06 18:22:07 rocky Exp $
$Id: nrg.c,v 1.4 2004/03/20 22:46:57 rocky Exp $
Copyright (C) 2001, 2003 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
@@ -48,7 +48,7 @@
#include "cdio_private.h"
#include "_cdio_stdio.h"
static const char _rcsid[] = "$Id: nrg.c,v 1.3 2004/03/06 18:22:07 rocky Exp $";
static const char _rcsid[] = "$Id: nrg.c,v 1.4 2004/03/20 22:46:57 rocky Exp $";
/* structures used */
@@ -998,6 +998,7 @@ _cdio_nrg_destroy (void *obj)
if (NULL != env->mapping)
_cdio_list_free (env->mapping, true);
cdio_generic_stdio_free(env);
free(env);
}
/*
@@ -1215,6 +1216,7 @@ cdio_open_nrg (const char *source_name)
return ret;
else {
cdio_generic_stdio_free (_data);
free(_data);
return NULL;
}