commit b35c61d151a544e507e852c1e427d3af3a614fb7
parent 09286bb686d5af630372696d020abe9f61ef115d
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 12 Jun 2010 23:33:45 +0000
check in case allocation failed
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
@@ -343,6 +343,8 @@ _set_priority (MHD_gtls_priority_st * st, const int *list)
{
int num = 0;
+ if (list == NULL)
+ return 0;
while ((list[num] != 0) && (num < MAX_ALGOS))
num++;
st->num_algorithms = num;