Hi,
Just trying to submit a patch for an issue identified by coverity...
From 3d8bea50a050deebe668c6e199e07f875599cc57 Mon Sep 17 00:00:00 2001
From: Cynthia Rempel <cynt...@rtems.org>
Date: Thu, 22 Aug 2013 19:56:20 -0700
Subject: [PATCH] Fixes use after free Kept logic the same, fixes CID 1063901
in coverity scan
---
cpukit/libcsupport/src/mount.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cpukit/libcsupport/src/mount.c b/cpukit/libcsupport/src/mount.c
index 92033e1..e8a53f3 100644
--- a/cpukit/libcsupport/src/mount.c
+++ b/cpukit/libcsupport/src/mount.c
@@ -92,13 +92,13 @@ static rtems_filesystem_mount_table_entry_t *alloc_mount_table_entry(
1,
sizeof(*mt_fs_root)
);
+ *target_length_ptr = target_size - 1;
+ return mt_entry;
} else {
free( mt_entry );
+ *target_length_ptr = target_size - 1;
+ return NULL;
}
-
- *target_length_ptr = target_size - 1;
-
- return mt_entry;
}
static int register_subordinate_file_system(
--
1.8.1.2
_______________________________________________
rtems-devel mailing list
rtems-devel@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel