Commit 9fb99115 authored by conrad's avatar conrad
Browse files

initialize FLAC encode buffer pointer to avoid unmatched free when deleting

an unused encoder


git-svn-id: http://svn.annodex.net/libfishsound/branches/1.0-stable@3373 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 75e07df7
......@@ -675,7 +675,10 @@ fs_flac_delete (FishSound * fsound)
FLAC__stream_encoder_finish(fi->fse);
FLAC__stream_encoder_delete(fi->fse);
}
if (fi->buffer) fs_free(fi->buffer);
if (fi->buffer) {
fs_free(fi->buffer);
fi->buffer = NULL;
}
}
if (fi->ipcm) fs_free(fi->ipcm);
......@@ -741,11 +744,12 @@ fs_flac_init (FishSound * fsound)
fi = fs_malloc (sizeof (FishSoundFlacInfo));
if (fi == NULL) return NULL;
fi->fsd = NULL;
fi->fse = NULL;
fi->buffer = NULL;
fi->packetno = 0;
fi->header = 0;
fi->header_packets = 0;
fi->fsd = NULL;
fi->fse = NULL;
fi->ipcm = NULL;
for (i = 0; i < 8; i++) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment