Skip to content

Commit

Permalink
[Pal/Linux-SGX] Init ret to avoid incorrect return value in `handle…
Browse files Browse the repository at this point in the history
…_serialize()`

Signed-off-by: aneessahib <anees.a.sahib@intel.com>
  • Loading branch information
aneessahib authored and dimakuv committed Sep 28, 2021
1 parent de42e84 commit 5c505d4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Pal/src/host/Linux-SGX/db_streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ static ssize_t handle_serialize(PAL_HANDLE handle, void** data) {
memcpy(buffer + hdlsz, d1, dsz1);
if (dsz2)
memcpy(buffer + hdlsz + dsz1, d2, dsz2);

ret = 0;
out:
if (free_d1)
free((void*)d1);
Expand Down

0 comments on commit 5c505d4

Please sign in to comment.