ssl/ssl_ciph.c:821: error: NULL_DEREFERENCE
  pointer `comp` last assigned on line 820 could be null and is dereferenced at line 821, column 2.
Showing all 3 steps of the trace


ssl/ssl_ciph.c:815:1: start of procedure SSL_COMP_add_compression_method()
813.   	}
814.   
815. > int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm)
816.   	{
817.   	SSL_COMP *comp;

ssl/ssl_ciph.c:820:2: 
818.   	STACK_OF(SSL_COMP) *sk;
819.   
820. > 	comp=(SSL_COMP *)Malloc(sizeof(SSL_COMP));
821.   	comp->id=id;
822.   	comp->method=cm;

ssl/ssl_ciph.c:821:2: 
819.   
820.   	comp=(SSL_COMP *)Malloc(sizeof(SSL_COMP));
821. > 	comp->id=id;
822.   	comp->method=cm;
823.   	if (ssl_comp_methods == NULL)

int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm)
	{
	SSL_COMP *comp;
	STACK_OF(SSL_COMP) *sk;
	comp=(SSL_COMP *)Malloc(sizeof(SSL_COMP));
	comp->id=id;
	comp->method=cm;
	if (ssl_comp_methods == NULL)
		sk=ssl_comp_methods=sk_SSL_COMP_new(sk_comp_cmp);
	else
		sk=ssl_comp_methods;
	if ((sk == NULL) || !sk_SSL_COMP_push(sk,comp))
		{
		SSLerr(SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD,ERR_R_MALLOC_FAILURE);
		return(0);
		}
	else
		return(1);
	}
['int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm)\n\t{\n\tSSL_COMP *comp;\n\tSTACK_OF(SSL_COMP) *sk;\n\tcomp=(SSL_COMP *)Malloc(sizeof(SSL_COMP));\n\tcomp->id=id;\n\tcomp->method=cm;\n\tif (ssl_comp_methods == NULL)\n\t\tsk=ssl_comp_methods=sk_SSL_COMP_new(sk_comp_cmp);\n\telse\n\t\tsk=ssl_comp_methods;\n\tif ((sk == NULL) || !sk_SSL_COMP_push(sk,comp))\n\t\t{\n\t\tSSLerr(SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD,ERR_R_MALLOC_FAILURE);\n\t\treturn(0);\n\t\t}\n\telse\n\t\treturn(1);\n\t}']