diff options
author | Colin Guthrie <pulse@colin.guthr.ie> | 2008-05-06 00:14:33 +0000 |
---|---|---|
committer | Colin Guthrie <pulse@colin.guthr.ie> | 2008-10-08 20:32:06 +0100 |
commit | a0d3582fb1bddbb8fb6a7da98bbfeb05b517088e (patch) | |
tree | ada1c9f9ede0889ded69de25aa4f67fe25eee307 /src/modules | |
parent | a08d733fd149d3d927583bad0dc69104d08b0ceb (diff) |
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
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/rtp/base64.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/rtp/base64.c b/src/modules/rtp/base64.c index ec9f2212..043ef5a8 100644 --- a/src/modules/rtp/base64.c +++ b/src/modules/rtp/base64.c @@ -33,6 +33,8 @@ #include <stdlib.h> #include <string.h> +#include <pulse/xmalloc.h> + #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;) { |