1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-31 00:03:07 +03:00

tests: Do not free pcap context while it is in use by the server session

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2019-05-29 18:11:26 +02:00
committed by Andreas Schneider
parent 9f178be1fa
commit 66755c478c

View File

@ -96,7 +96,11 @@ static void cleanup_pcap(struct session_data_st *sdata)
return;
}
ssh_pcap_file_free(sdata->pcap);
/* Do not free the pcap data context here since its ownership was
* transfered to the session object, which will take care of its cleanup.
* Morover it is still in use so we can very simply crash by freeing
* it here.
*/
sdata->pcap = NULL;
}
#endif