aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/protocols/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c
index d6c77e736..7a6fa1078 100644
--- a/src/lib/protocols/http.c
+++ b/src/lib/protocols/http.c
@@ -633,7 +633,7 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
if(flow->http.nat_ip == NULL) {
len = packet->forwarded_line.len;
flow->http.nat_ip = ndpi_malloc(len + 1);
- if(flow->http.nat_ip == NULL) {
+ if(flow->http.nat_ip != NULL) {
strncpy(flow->http.nat_ip, (char*)packet->forwarded_line.ptr, len);
flow->http.nat_ip[len] = '\0';
}