aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/outputBuffer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/outputBuffer.c b/src/outputBuffer.c
index b478c2c52..04641faa3 100644
--- a/src/outputBuffer.c
+++ b/src/outputBuffer.c
@@ -76,7 +76,9 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream,
datalen = pcm_sizeOfConvBuffer(&(dc->audioFormat), dataInLen,
&(cb->audioFormat));
if (datalen > convBufferLen) {
- convBuffer = xrealloc(convBuffer, datalen);
+ if (convBuffer != NULL)
+ free(convBuffer);
+ convBuffer = xmalloc(datalen);
convBufferLen = datalen;
}
data = convBuffer;