From a0d3582fb1bddbb8fb6a7da98bbfeb05b517088e Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Tue, 6 May 2008 00:14:33 +0000 Subject: [PATCH] Trivial change to allocate memory using pulse methods. git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/coling@2364 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/modules/rtp/base64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/rtp/base64.c b/src/modules/rtp/base64.c index ec9f221..043ef5a 100644 --- a/src/modules/rtp/base64.c +++ b/src/modules/rtp/base64.c @@ -33,6 +33,8 @@ #include #include +#include + #include "base64.h" static char base64_chars[] = @@ -54,9 +56,7 @@ int pa_base64_encode(const void *data, int size, char **str) int c; const unsigned char *q; - p = s = (char *) malloc(size * 4 / 3 + 4); - if (p == NULL) - return -1; + p = s = pa_xnew(char, size * 4 / 3 + 4); q = (const unsigned char *) data; i = 0; for (i = 0; i < size;) { -- 2.7.4