lib/driver/gnu_linux.c: bug #19221 (possibly): memory Leak opening an inaccessible device.
cdchange.c: a stray character got added to the file
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: cdchange.c,v 1.4 2007/03/05 11:49:24 rocky Exp $
|
$Id: cdchange.c,v 1.5 2007/03/07 04:35:47 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2005, 2006, 2007 Rocky Bernstein <rocky@gnu.org>
|
Copyright (C) 2005, 2006, 2007 Rocky Bernstein <rocky@gnu.org>
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ main(int argc, const char *argv[])
|
|||||||
if (argc > 2) {
|
if (argc > 2) {
|
||||||
errno = 0;
|
errno = 0;
|
||||||
i_sleep = strtol(argv[2], (char **)NULL, 10);
|
i_sleep = strtol(argv[2], (char **)NULL, 10);
|
||||||
if ( (LONG_MIN == i_sleep || LONG_MAX == i_sleep && Lerrno != 0) ) {
|
if ( (LONG_MIN == i_sleep || LONG_MAX == i_sleep && errno != 0) ) {
|
||||||
printf("Invalid sleep parameter %s\n", argv[2]);
|
printf("Invalid sleep parameter %s\n", argv[2]);
|
||||||
printf("Error reported back from strtol: %s\n", strerror(errno));
|
printf("Error reported back from strtol: %s\n", strerror(errno));
|
||||||
return 2;
|
return 2;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: gnu_linux.c,v 1.27 2006/11/27 19:31:37 gmerlin Exp $
|
$Id: gnu_linux.c,v 1.28 2007/03/07 04:35:47 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Rocky Bernstein
|
Copyright (C) 2002, 2003, 2004, 2005, 2006 Rocky Bernstein
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char _rcsid[] = "$Id: gnu_linux.c,v 1.27 2006/11/27 19:31:37 gmerlin Exp $";
|
static const char _rcsid[] = "$Id: gnu_linux.c,v 1.28 2007/03/07 04:35:47 rocky Exp $";
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
@@ -1633,6 +1633,7 @@ cdio_open_am_linux (const char *psz_orig_source, const char *access_mode)
|
|||||||
return ret;
|
return ret;
|
||||||
} else {
|
} else {
|
||||||
cdio_generic_free (_data);
|
cdio_generic_free (_data);
|
||||||
|
free(ret);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user