summaryrefslogtreecommitdiff
path: root/libpiano/src/http.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2009-08-07 12:33:42 +0200
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2009-08-07 12:33:42 +0200
commitfcb0130deaf8483fa130a3af7a2bb3451c2206a9 (patch)
treefe6f6abbd4d90e914ed505c81ccdda77ab7bd0a0 /libpiano/src/http.c
parentc43af87ffb13775ea71795baa595e4633f9fd529 (diff)
parent0cd2322d48c8889e47a0d5ee635503c19cb6fb2b (diff)
downloadpianobar-fcb0130deaf8483fa130a3af7a2bb3451c2206a9.tar.gz
pianobar-fcb0130deaf8483fa130a3af7a2bb3451c2206a9.tar.bz2
pianobar-fcb0130deaf8483fa130a3af7a2bb3451c2206a9.zip
Merge branch 'alloc_err'
Diffstat (limited to 'libpiano/src/http.c')
-rw-r--r--libpiano/src/http.c4
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;