Skip to content

Commit

Permalink
fix(userspace): ensure scap_get_fdlist can return SCAP_SUCCESS
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenzo Susini <[email protected]>
  • Loading branch information
loresuso authored and poiana committed Oct 16, 2023
1 parent 2fbbf09 commit 03ab1bf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions userspace/libscap/scap_platform_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,7 @@ int32_t scap_get_fdlist(struct scap* handle, struct scap_threadinfo *tinfo)
{
if (handle && handle->m_platform && handle->m_platform->m_vtable->get_fdlist)
{
int32_t res = handle->m_platform->m_vtable->get_fdlist(handle->m_platform, tinfo, handle->m_lasterr);
if(res != SCAP_SUCCESS)
{
return SCAP_FAILURE;
}
return handle->m_platform->m_vtable->get_fdlist(handle->m_platform, tinfo, handle->m_lasterr);
}

snprintf(handle->m_lasterr, SCAP_LASTERR_SIZE, "operation not supported");
Expand Down

0 comments on commit 03ab1bf

Please sign in to comment.