From: Ilia Alshanetsky Date: Mon, 31 Jul 2006 03:41:20 +0000 (+0000) Subject: Fixed compiler warning. X-Git-Tag: php-5.2.0RC2~142 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=610b633096049cf4455be0831e2bf2ff0db9c5c9;p=php Fixed compiler warning. --- diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 58d32703c7..9291843cd7 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -238,7 +238,7 @@ static void add_assoc_name_entry(zval * val, char * key, X509_NAME * name, int s char *sname; int nid; X509_NAME_ENTRY * ne; - ASN1_STRING * str; + ASN1_STRING * str = NULL; ASN1_OBJECT * obj; MAKE_STD_ZVAL(subitem); @@ -279,7 +279,7 @@ static void add_assoc_name_entry(zval * val, char * key, X509_NAME * name, int s } else { zval_dtor(subentries); FREE_ZVAL(subentries); - if (obj_cnt) { + if (obj_cnt && str) { add_assoc_stringl(subitem, sname, (char *)str->data, str->length, 1); } }