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:
committed by
Andreas Schneider
parent
9f178be1fa
commit
66755c478c
@ -96,7 +96,11 @@ static void cleanup_pcap(struct session_data_st *sdata)
|
|||||||
return;
|
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;
|
sdata->pcap = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user