diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-08-07 12:26:31 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-08-07 12:26:31 +0200 |
commit | 0cd2322d48c8889e47a0d5ee635503c19cb6fb2b (patch) | |
tree | fe6f6abbd4d90e914ed505c81ccdda77ab7bd0a0 /libpiano/src/http.c | |
parent | 3d7998a44299c69e7d721c4c5a20ddc32cec562b (diff) | |
download | pianobar-0cd2322d48c8889e47a0d5ee635503c19cb6fb2b.tar.gz pianobar-0cd2322d48c8889e47a0d5ee635503c19cb6fb2b.tar.bz2 pianobar-0cd2322d48c8889e47a0d5ee635503c19cb6fb2b.zip |
piano: Check (m|c|re)alloc return value
Diffstat (limited to 'libpiano/src/http.c')
-rw-r--r-- | libpiano/src/http.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libpiano/src/http.c b/libpiano/src/http.c index d33a4e5..f21b839 100644 --- a/libpiano/src/http.c +++ b/libpiano/src/http.c @@ -43,6 +43,10 @@ PianoReturn_t PianoHttpPost (WaitressHandle_t *waith, const char *postData, PianoReturn_t pRet = PIANO_RET_NET_ERROR; char *reqPostData = PianoEncryptString (postData); + if (reqPostData == NULL) { + return PIANO_RET_OUT_OF_MEMORY; + } + waith->extraHeaders = "Content-Type: text/xml\r\n"; waith->postData = reqPostData; waith->method = WAITRESS_METHOD_POST; |