Skip to content

Commit

Permalink
[core] CodeQL warning: checking NULL after new.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Jan 26, 2023
1 parent b8962b4 commit 0c583f8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions srtcore/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,10 +460,8 @@ SRTSOCKET srt::CUDTUnited::newSocket(CUDTSocket** pps)
// failure and rollback
delete ns;
ns = NULL;
}

if (!ns)
throw CUDTException(MJ_SYSTEMRES, MN_MEMORY, 0);
}

if (pps)
*pps = ns;
Expand Down

0 comments on commit 0c583f8

Please sign in to comment.