lkml.org 
[lkml]   [2009]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/13] fsnotify: allow groups to add private data to events
On Thu, Mar 19, 2009 at 02:05:47PM -0400, Eric Paris wrote:

> -int fsnotify_add_notif_event(struct fsnotify_group *group, struct fsnotify_event *event)
> +int fsnotify_add_notif_event(struct fsnotify_group *group, struct fsnotify_event *event, struct fsnotify_event_private_data *priv)
> {
> struct fsnotify_event_holder *holder;
> struct list_head *list = &group->notification_list;
> @@ -166,6 +183,8 @@ int fsnotify_add_notif_event(struct fsnotify_group *group, struct fsnotify_event
>
> fsnotify_get_event(event);
> list_add_tail(&holder->event_list, list);
> + if (priv)
> + list_add_tail(&priv->event_list, &event->private_data_list);

Won't that leak priv if we bugger off earlier? On OOM or on finding last_event
we are OK with...


\
 
 \ /
  Last update: 2009-03-23 12:07    [W:0.135 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site