Skip to content

Commit

Permalink
fix CSSNodeList memory leak
Browse files Browse the repository at this point in the history
Summary:
CSSNodeListFree does not free the list->items memory
Closes facebook/yoga#214

Differential Revision: D3683643

Pulled By: emilsjolander

fbshipit-source-id: 7f9ef19f4603d5558cc2f8302756b3bcec2f6c12
  • Loading branch information
ymmuse authored and Facebook Github Bot 9 committed Aug 8, 2016
1 parent 54f867f commit 7b02c1d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion React/CSSLayout/CSSNodeList.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ CSSNodeListRef CSSNodeListNew(uint32_t initialCapacity) {
return list;
}

void CSSNodeListFree(CSSNodeListRef list) { free(list); }
void CSSNodeListFree(CSSNodeListRef list) {
free(list->items);
free(list);
}

uint32_t CSSNodeListCount(CSSNodeListRef list) { return list->count; }

Expand Down

0 comments on commit 7b02c1d

Please sign in to comment.