Messages in this thread | | | Date | Mon, 23 Mar 2009 11:04:29 +0000 | From | Al Viro <> | Subject | Re: [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...
| |