Skip to content

Commit 8068ba7

Browse files
crafcat7xiaoxiang781216
authored andcommitted
fs_automount:fix ci break
==================================================================================== Configuration/Tool: spresense/example_camera,CONFIG_ARM_TOOLCHAIN_GNU_EABI 2024-11-12 12:24:37 ------------------------------------------------------------------------------------ Cleaning... Configuring... Disabling CONFIG_ARM_TOOLCHAIN_GNU_EABI Enabling CONFIG_ARM_TOOLCHAIN_GNU_EABI Building NuttX... mount/fs_automount.c: In function 'automount_initialize': Error: mount/fs_automount.c:816:7: error: 'return' with no value, in function returning non-void [-Werror=return-type] 816 | return; | ^~~~~~ In file included from mount/fs_automount.c:43: /github/workspace/sources/nuttx/include/nuttx/fs/automount.h:176:11: note: declared here 176 | FAR void *automount_initialize(FAR const struct automount_lower_s *lower); | ^~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: chenrun1 <[email protected]>
1 parent 064b94b commit 8068ba7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fs/mount/fs_automount.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower)
813813
FAR char *devpath = lib_get_pathbuffer();
814814
if (devpath == NULL)
815815
{
816-
return;
816+
return NULL;
817817
}
818818
#endif /* CONFIG_FS_AUTOMOUNTER_DRIVER */
819819

@@ -826,6 +826,9 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower)
826826
if (priv == NULL)
827827
{
828828
ferr("ERROR: Failed to allocate state structure\n");
829+
#ifdef CONFIG_FS_AUTOMOUNTER_DRIVER
830+
lib_put_pathbuffer(devpath);
831+
#endif /* CONFIG_FS_AUTOMOUNTER_DRIVER */
829832
return NULL;
830833
}
831834

0 commit comments

Comments
 (0)