Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion erpc_c/port/erpc_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void *erpc_malloc(size_t size);
/*!
* @brief This function free given memory block.
*
* @param[in] ptr Pointer to memory which should be freed.
* @param[in] ptr Pointer to memory which should be freed, or NULL.
*/
void erpc_free(void *ptr);

Expand Down
10 changes: 2 additions & 8 deletions erpcgen/src/templates/c_common_functions.template
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,7 @@ else

{# ---------------- freeData ---------------- #}
{% def freeData(info) %}
if ({$info.freeName})
{
erpc_free({$info.freeName});
}
erpc_free({$info.freeName});
{% enddef ------------------------------- freeData %}

{# ---------------- freeStruct ---------------- #}
Expand All @@ -400,10 +397,7 @@ if ({$info.name})
{% if info.needFreeingCall == true %}
{$freeArray(info)}
{% endif %}
if ({$info.name})
{
erpc_free({$info.name});
}
erpc_free({$info.name});
{% enddef ------------------------------- freeList %}

{# ---------------- freeArray ---------------- #}
Expand Down