#4042 closed defect (fixed)

dosfs: Memory leak on failed mount attempts (cloned)

Reported by: Christian Mauderer Owned by: Christian Mauderer
Priority: normal Milestone:
Component: fs/fat Version: 6
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

Cloned from #4041:


If the mount for a dosfs (FAT) fails, the converter that is used to encode and decode the file names is not destroyed. That will lead to memory leaks.

Note that there are two cases:

  1. User doesn't provide a converter. In this case a default converter is created implicitly.
  1. User does provide a converter.

Both have to be handled slightly different.

Change History (1)

comment:1 Changed on 08/04/20 at 06:25:51 by Christian Mauderer <christian.mauderer@…>

Resolution: fixed
Status: assignedclosed

In 87fdb20/rtems:

dosfs: Fix memory leak on failed mounts.

Currently if mount fails, a converter isn't destroyed. We have to take
care of two cases:

  1. The user doesn't provide a converter.

In this case mounting a dosfs creates a default converter. This patch
makes sure that the converter is destroyed again if mount failes for
this case.

  1. The user provides a converter.

In this case it's not sure that the dosfs specific routines are reached
because mount can fail before that. Therefore the user has to destroy
the converter himself again. This patch adds a documentation for that
and implements it in the media server.

Closes #4042.

Note: See TracTickets for help on using tickets.