More valgrind-found memory leaks. (More to come...)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: _cdio_bincue.c,v 1.38 2004/01/09 02:42:39 rocky Exp $
|
||||
$Id: _cdio_bincue.c,v 1.39 2004/02/07 18:53:02 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: _cdio_bincue.c,v 1.38 2004/01/09 02:42:39 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: _cdio_bincue.c,v 1.39 2004/02/07 18:53:02 rocky Exp $";
|
||||
|
||||
#include "cdio_assert.h"
|
||||
#include "cdio_private.h"
|
||||
@@ -580,7 +580,7 @@ _cdio_bincue_free (void *env) {
|
||||
|
||||
if (NULL == _obj) return;
|
||||
free_if_notnull(_obj->mcn);
|
||||
cdio_generic_stream_free(_obj);
|
||||
cdio_generic_stdio_free(_obj);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -917,6 +917,7 @@ cdio_open_bincue (const char *source_name)
|
||||
char *bin_name = cdio_is_cuefile(source_name);
|
||||
|
||||
if (NULL != bin_name) {
|
||||
free(bin_name);
|
||||
return cdio_open_cue(source_name);
|
||||
} else {
|
||||
char *cue_name = cdio_is_binfile(source_name);
|
||||
@@ -950,7 +951,7 @@ cdio_open_cue (const char *cue_name)
|
||||
if (_cdio_init(_data)) {
|
||||
return ret;
|
||||
} else {
|
||||
cdio_generic_stream_free (_data);
|
||||
cdio_generic_stdio_free (_data);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: _cdio_generic.c,v 1.11 2003/09/28 17:14:20 rocky Exp $
|
||||
$Id: _cdio_generic.c,v 1.12 2004/02/07 18:53:02 rocky Exp $
|
||||
|
||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com>
|
||||
@@ -27,7 +27,7 @@
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
static const char _rcsid[] = "$Id: _cdio_generic.c,v 1.11 2003/09/28 17:14:20 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: _cdio_generic.c,v 1.12 2004/02/07 18:53:02 rocky Exp $";
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -126,7 +126,7 @@ cdio_generic_read (void *user_data, void *buf, size_t size)
|
||||
Release and free resources associated with stream or disk image.
|
||||
*/
|
||||
void
|
||||
cdio_generic_stream_free (void *user_data)
|
||||
cdio_generic_stdio_free (void *user_data)
|
||||
{
|
||||
generic_img_private_t *_obj = user_data;
|
||||
|
||||
@@ -134,7 +134,7 @@ cdio_generic_stream_free (void *user_data)
|
||||
free (_obj->source_name);
|
||||
|
||||
if (_obj->data_source)
|
||||
cdio_stream_destroy (_obj->data_source);
|
||||
cdio_stdio_destroy (_obj->data_source);
|
||||
|
||||
free (_obj);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: _cdio_nrg.c,v 1.30 2004/02/01 15:53:06 rocky Exp $
|
||||
$Id: _cdio_nrg.c,v 1.31 2004/02/07 18:53:02 rocky Exp $
|
||||
|
||||
Copyright (C) 2001,2003 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
||||
@@ -48,7 +48,7 @@
|
||||
#include "cdio_private.h"
|
||||
#include "_cdio_stdio.h"
|
||||
|
||||
static const char _rcsid[] = "$Id: _cdio_nrg.c,v 1.30 2004/02/01 15:53:06 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: _cdio_nrg.c,v 1.31 2004/02/07 18:53:02 rocky Exp $";
|
||||
|
||||
/* structures used */
|
||||
|
||||
@@ -1092,7 +1092,7 @@ cdio_open_nrg (const char *source_name)
|
||||
|
||||
cdio_funcs _funcs = {
|
||||
.eject_media = cdio_generic_bogus_eject_media,
|
||||
.free = cdio_generic_stream_free,
|
||||
.free = cdio_generic_stdio_free,
|
||||
.get_arg = _cdio_get_arg,
|
||||
.get_devices = cdio_get_devices_nrg,
|
||||
.get_default_device = cdio_get_default_device_nrg,
|
||||
@@ -1131,7 +1131,7 @@ cdio_open_nrg (const char *source_name)
|
||||
if (_cdio_init(_data))
|
||||
return ret;
|
||||
else {
|
||||
cdio_generic_stream_free (_data);
|
||||
cdio_generic_stdio_free (_data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: _cdio_stdio.c,v 1.5 2004/01/10 03:03:08 rocky Exp $
|
||||
$Id: _cdio_stdio.c,v 1.6 2004/02/07 18:53:02 rocky Exp $
|
||||
|
||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "_cdio_stream.h"
|
||||
#include "_cdio_stdio.h"
|
||||
|
||||
static const char _rcsid[] = "$Id: _cdio_stdio.c,v 1.5 2004/01/10 03:03:08 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: _cdio_stdio.c,v 1.6 2004/02/07 18:53:02 rocky Exp $";
|
||||
|
||||
#define CDIO_STDIO_BUFSIZE (128*1024)
|
||||
|
||||
@@ -171,6 +171,15 @@ _stdio_read(void *user_data, void *buf, long int count)
|
||||
return read;
|
||||
}
|
||||
|
||||
/*!
|
||||
Deallocate resources assocaited with obj. After this obj is unusable.
|
||||
*/
|
||||
void
|
||||
cdio_stdio_destroy(CdioDataSource *obj)
|
||||
{
|
||||
cdio_stream_destroy(obj);
|
||||
}
|
||||
|
||||
CdioDataSource*
|
||||
cdio_stdio_new(const char pathname[])
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: _cdio_stdio.h,v 1.2 2004/01/10 03:03:08 rocky Exp $
|
||||
$Id: _cdio_stdio.h,v 1.3 2004/02/07 18:53:02 rocky Exp $
|
||||
|
||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
||||
@@ -34,6 +34,12 @@
|
||||
*/
|
||||
CdioDataSource* cdio_stdio_new(const char pathname[]);
|
||||
|
||||
/*!
|
||||
Deallocate resources assocaited with obj. After this obj is unusable.
|
||||
*/
|
||||
void cdio_stdio_destroy(CdioDataSource *obj);
|
||||
|
||||
|
||||
#endif /* __CDIO_STREAM_STDIO_H__ */
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: _cdio_stream.c,v 1.8 2004/01/10 03:03:08 rocky Exp $
|
||||
$Id: _cdio_stream.c,v 1.9 2004/02/07 18:53:02 rocky Exp $
|
||||
|
||||
Copyright (C) 2000, 2004 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <cdio/util.h>
|
||||
#include "_cdio_stream.h"
|
||||
|
||||
static const char _rcsid[] = "$Id: _cdio_stream.c,v 1.8 2004/01/10 03:03:08 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: _cdio_stream.c,v 1.9 2004/02/07 18:53:02 rocky Exp $";
|
||||
|
||||
/*
|
||||
* DataSource implementations
|
||||
@@ -186,6 +186,8 @@ cdio_stream_destroy(CdioDataSource* obj)
|
||||
cdio_stream_close(obj);
|
||||
|
||||
obj->op.free(obj->user_data);
|
||||
|
||||
free(obj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: _cdio_stream.h,v 1.7 2004/01/10 03:03:08 rocky Exp $
|
||||
$Id: _cdio_stream.h,v 1.8 2004/02/07 18:53:02 rocky Exp $
|
||||
|
||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
@@ -104,6 +104,9 @@ extern "C" {
|
||||
*/
|
||||
long int cdio_stream_stat(CdioDataSource* obj);
|
||||
|
||||
/*!
|
||||
Deallocate resources assocaited with obj. After this obj is unusable.
|
||||
*/
|
||||
void cdio_stream_destroy(CdioDataSource* obj);
|
||||
|
||||
void cdio_stream_close(CdioDataSource* obj);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: cdio_private.h,v 1.17 2003/09/30 03:26:11 rocky Exp $
|
||||
$Id: cdio_private.h,v 1.18 2004/02/07 18:53:02 rocky Exp $
|
||||
|
||||
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -275,7 +275,7 @@ extern "C" {
|
||||
/*!
|
||||
Release and free resources associated with stream or disk image.
|
||||
*/
|
||||
void cdio_generic_stream_free (void *env);
|
||||
void cdio_generic_stdio_free (void *env);
|
||||
|
||||
/*!
|
||||
Return true if source_name could be a device containing a CD-ROM on
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: iso9660_fs.c,v 1.15 2004/01/10 03:21:50 rocky Exp $
|
||||
$Id: iso9660_fs.c,v 1.16 2004/02/07 18:53:02 rocky Exp $
|
||||
|
||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
static const char _rcsid[] = "$Id: iso9660_fs.c,v 1.15 2004/01/10 03:21:50 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: iso9660_fs.c,v 1.16 2004/02/07 18:53:02 rocky Exp $";
|
||||
|
||||
/* Implementation of iso9660_t type */
|
||||
struct _iso9660 {
|
||||
@@ -79,7 +79,7 @@ bool
|
||||
iso9660_close (iso9660_t *iso)
|
||||
{
|
||||
if (NULL != iso) {
|
||||
cdio_stream_destroy(iso->stream);
|
||||
cdio_stdio_destroy(iso->stream);
|
||||
free(iso);
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user