Skip to content

Commit

Permalink
ntlm: Removed an unnecessary free of native Target Info
Browse files Browse the repository at this point in the history
Due to commit 40ee1ba the free in Curl_ntlm_decode_type2_target() is
longer required.
  • Loading branch information
captain-caveman2k committed Nov 9, 2014
1 parent 40ee1ba commit 8145f92
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/curl_ntlm_msgs.c
Expand Up @@ -193,9 +193,6 @@ CURLcode Curl_ntlm_decode_type2_target(struct SessionHandle *data,
unsigned int target_info_len = 0;
unsigned int target_info_offset = 0;

Curl_safefree(ntlm->target_info);
ntlm->target_info_len = 0;

if(size >= 48) {
target_info_len = readshort_le(&buffer[40]);
target_info_offset = readint_le(&buffer[44]);
Expand All @@ -212,12 +209,11 @@ CURLcode Curl_ntlm_decode_type2_target(struct SessionHandle *data,
return CURLE_OUT_OF_MEMORY;

memcpy(ntlm->target_info, &buffer[target_info_offset], target_info_len);
ntlm->target_info_len = target_info_len;

}

}

ntlm->target_info_len = target_info_len;

return CURLE_OK;
}

Expand Down

0 comments on commit 8145f92

Please sign in to comment.