4c6d80e114
The pstore_mkfile() function is passed a pointer to a struct pstore_record. On success it consumes this 'record' pointer and references it from the created inode. On failure, however, it may or may not free the record. There are even two different code paths which return -ENOMEM -- one of which does and the other doesn't free the record. Make the behaviour deterministic by never consuming and freeing the record when returning failure, allowing the caller to do the cleanup consistently. Signed-off-by: Norbert Manthey <nmanthey@amazon.de> Link: https://lore.kernel.org/r/1562331960-26198-1-git-send-email-nmanthey@amazon.de Fixes: |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
ftrace.c | ||
inode.c | ||
internal.h | ||
platform.c | ||
pmsg.c | ||
ram.c | ||
ram_core.c |