File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1009,6 +1009,22 @@ static inline void notify_queue_filep_event(FAR struct file *filep,
1009
1009
nxmutex_unlock (& g_inotify .lock );
1010
1010
}
1011
1011
1012
+ /****************************************************************************
1013
+ * Name: notify_free_entry
1014
+ *
1015
+ * Description:
1016
+ * Deallocate the hash entry.
1017
+ *
1018
+ ****************************************************************************/
1019
+
1020
+ static void notify_free_entry (FAR ENTRY * entry )
1021
+ {
1022
+ /* Key is alloced by lib_malloc, value is alloced by kmm_malloc */
1023
+
1024
+ lib_free (entry -> key );
1025
+ kmm_free (entry -> data );
1026
+ }
1027
+
1012
1028
/****************************************************************************
1013
1029
* Public Functions
1014
1030
****************************************************************************/
@@ -1276,6 +1292,7 @@ void notify_initialize(void)
1276
1292
{
1277
1293
int ret ;
1278
1294
1295
+ g_inotify .hash .free_entry = notify_free_entry ;
1279
1296
ret = hcreate_r (CONFIG_FS_NOTIFY_BUCKET_SIZE , & g_inotify .hash );
1280
1297
if (ret != 1 )
1281
1298
{
You can’t perform that action at this time.
0 commit comments