libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 0dafbfbb9588b4e7966a2a19fceedccfb477ad91
parent c9d38243c2990ecff32fba8f2d4e6c4427ab24af
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 24 Jan 2009 02:09:43 +0000

better

Diffstat:
Msrc/examples/querystring_example.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/examples/querystring_example.c b/src/examples/querystring_example.c @@ -54,6 +54,8 @@ ahc_echo (void *cls, *ptr = NULL; /* reset when done */ val = MHD_lookup_connection_value (connection, MHD_GET_ARGUMENT_KIND, "q"); me = malloc (snprintf (NULL, 0, fmt, "q", val) + 1); + if (me == NULL) + return MHD_NO; sprintf (me, fmt, "q", val); response = MHD_create_response_from_data (strlen (me), me, MHD_YES, MHD_NO); ret = MHD_queue_response (connection, MHD_HTTP_OK, response);