Skip to content

Commit

Permalink
fix(libscap/gvisor): use consistent new/delete functions for gvisor p…
Browse files Browse the repository at this point in the history
…latform

Signed-off-by: Luca Guerra <[email protected]>
  • Loading branch information
LucaGuerra authored and poiana committed Dec 20, 2023
1 parent 37e31d2 commit e2dbeb3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions userspace/libscap/engine/gvisor/gvisor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ static const struct scap_platform_vtable scap_gvisor_platform_vtable = {

scap_platform* scap_gvisor_alloc_platform(proc_entry_callback proc_callback, void* proc_callback_context)
{
struct scap_gvisor_platform* platform =
(struct scap_gvisor_platform*)calloc(sizeof(*platform), 1);
auto platform = new scap_gvisor_platform();
platform->m_generic.m_vtable = &scap_gvisor_platform_vtable;

init_proclist(&platform->m_generic.m_proclist, proc_callback, proc_callback_context);
Expand Down

0 comments on commit e2dbeb3

Please sign in to comment.