diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 540fa2b3f8..aa32ead26f 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -284,6 +284,10 @@ char *rend_client_get_random_intro(char *query) { smartlist_add(sl,entry->parsed->intro_points[i]); choice = smartlist_choose(sl); + if(!choice) { + smartlist_free(sl); + return NULL; + } nickname = tor_strdup(choice); smartlist_free(sl); return nickname;