mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
-fix resource leak
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@989 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -765,7 +765,7 @@ FILE *f_open(const char *filename, const char *acctype)
|
|||||||
URL url;
|
URL url;
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
int /*i,*/ compatibility_mode = 0;
|
int /*i,*/ compatibility_mode = 0;
|
||||||
char *ptr = NULL, buf[4096], type[10];
|
char *ptr = NULL, buf[4096] = {0}, type[10] = {0};
|
||||||
|
|
||||||
if(acctype)
|
if(acctype)
|
||||||
strcpy(type, acctype);
|
strcpy(type, acctype);
|
||||||
@@ -1776,16 +1776,17 @@ STREAM_FILTER *ShoutCAST_InitFilter(int meta_int)
|
|||||||
|
|
||||||
void ShoutCAST_MetaFilter(STREAM_FILTER *arg)
|
void ShoutCAST_MetaFilter(STREAM_FILTER *arg)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/* bug trap */
|
||||||
|
if(!arg)
|
||||||
|
return;
|
||||||
|
|
||||||
FILTERDATA *filterdata = (FILTERDATA*)arg->user;
|
FILTERDATA *filterdata = (FILTERDATA*)arg->user;
|
||||||
int meta_int = filterdata->meta_int;
|
int meta_int = filterdata->meta_int;
|
||||||
int len = *arg->len;
|
int len = *arg->len;
|
||||||
char*buf = (char*)arg->buf;
|
char*buf = (char*)arg->buf;
|
||||||
int meta_start;
|
int meta_start;
|
||||||
|
|
||||||
/* bug trap */
|
|
||||||
if(!arg)
|
|
||||||
return;
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
dprintf(stderr, "filter : cnt : %d\n", filterdata->cnt);
|
dprintf(stderr, "filter : cnt : %d\n", filterdata->cnt);
|
||||||
dprintf(stderr, "filter : len : %d\n", filterdata->len);
|
dprintf(stderr, "filter : len : %d\n", filterdata->len);
|
||||||
|
@@ -190,6 +190,7 @@ int fh_bmp_load(const char *name,unsigned char **buffer,int* xp,int* yp)
|
|||||||
if(tbuffer==NULL)
|
if(tbuffer==NULL)
|
||||||
{
|
{
|
||||||
printf("Error: malloc\n");
|
printf("Error: malloc\n");
|
||||||
|
close(fd);
|
||||||
return (FH_ERROR_MALLOC);
|
return (FH_ERROR_MALLOC);
|
||||||
}
|
}
|
||||||
for (i=0; i<y; i++)
|
for (i=0; i<y; i++)
|
||||||
|
Reference in New Issue
Block a user