Closed NeKzor closed 3 months ago
Follow-up of #5
Summary
1.) The switch case statement on SAR_DATA_ENTITY_INPUT_SLOT has a fall-through here: https://github.com/p2sr/mdp/blob/4a580f63eb5c70bd1371153f2ff1ad219a1598fa/src/demo.c#L155-L158 but this case is missing in _sar_data_free: https://github.com/p2sr/mdp/blob/4a580f63eb5c70bd1371153f2ff1ad219a1598fa/src/demo.c#L30-L37
SAR_DATA_ENTITY_INPUT_SLOT
_sar_data_free
2.) Missing call to closedir after opendir: https://github.com/p2sr/mdp/blob/4a580f63eb5c70bd1371153f2ff1ad219a1598fa/src/main.c#L301-L325
closedir
opendir
3.) strdup allocated header fields are not freed: https://github.com/p2sr/mdp/blob/4a580f63eb5c70bd1371153f2ff1ad219a1598fa/src/demo.c#L546-L550 https://github.com/p2sr/mdp/blob/4a580f63eb5c70bd1371153f2ff1ad219a1598fa/src/demo.c#L84-L91
strdup
Follow-up of #5
Summary
1.) The switch case statement on
SAR_DATA_ENTITY_INPUT_SLOT
has a fall-through here: https://github.com/p2sr/mdp/blob/4a580f63eb5c70bd1371153f2ff1ad219a1598fa/src/demo.c#L155-L158 but this case is missing in_sar_data_free
: https://github.com/p2sr/mdp/blob/4a580f63eb5c70bd1371153f2ff1ad219a1598fa/src/demo.c#L30-L372.) Missing call to
closedir
afteropendir
: https://github.com/p2sr/mdp/blob/4a580f63eb5c70bd1371153f2ff1ad219a1598fa/src/main.c#L301-L3253.)
strdup
allocated header fields are not freed: https://github.com/p2sr/mdp/blob/4a580f63eb5c70bd1371153f2ff1ad219a1598fa/src/demo.c#L546-L550 https://github.com/p2sr/mdp/blob/4a580f63eb5c70bd1371153f2ff1ad219a1598fa/src/demo.c#L84-L91