소스 검색

http_client: fixed safety check looking up var names

Daniel-Constantin Mierla 7 년 전
부모
커밋
74215ac168
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      src/modules/http_client/http_client.c

+ 3 - 3
src/modules/http_client/http_client.c

@@ -561,7 +561,7 @@ static int ki_curl_connect(sip_msg_t *_m, str *con, str *url, str *dpv)
 	pv_spec_t *dst;
 	pv_spec_t *dst;
 
 
 	dst = pv_cache_get(dpv);
 	dst = pv_cache_get(dpv);
-	if(dpv==NULL) {
+	if(dst==NULL) {
 		LM_ERR("failed to get pv spec for: %.*s\n", dpv->len, dpv->s);
 		LM_ERR("failed to get pv spec for: %.*s\n", dpv->len, dpv->s);
 		return -1;
 		return -1;
 	}
 	}
@@ -635,7 +635,7 @@ static int ki_curl_connect_post(sip_msg_t *_m, str *con, str *url,
 	pv_spec_t *dst;
 	pv_spec_t *dst;
 
 
 	dst = pv_cache_get(dpv);
 	dst = pv_cache_get(dpv);
-	if(dpv==NULL) {
+	if(dst==NULL) {
 		LM_ERR("failed to get pv spec for: %.*s\n", dpv->len, dpv->s);
 		LM_ERR("failed to get pv spec for: %.*s\n", dpv->len, dpv->s);
 		return -1;
 		return -1;
 	}
 	}
@@ -810,7 +810,7 @@ static int ki_http_query_post_hdrs(sip_msg_t *_m, str *url, str *post, str *hdrs
 	pv_spec_t *dst;
 	pv_spec_t *dst;
 
 
 	dst = pv_cache_get(dpv);
 	dst = pv_cache_get(dpv);
-	if(dpv==NULL) {
+	if(dst==NULL) {
 		LM_ERR("failed to get pv spec for: %.*s\n", dpv->len, dpv->s);
 		LM_ERR("failed to get pv spec for: %.*s\n", dpv->len, dpv->s);
 		return -1;
 		return -1;
 	}
 	}