From b6571f600c9155788b1dd3eedfc7fcca38bbfac9 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 17 Aug 2001 00:27:02 +0000 Subject: [PATCH] efsd_ops() leaks. not sure what you want cK? have the monitor func free the ops or have the app do it? you dont seem to have any code to free the ops created in libefsd.. so i'm not sure what you intend? :) SVN revision: 5187 --- src/view.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/src/view.c b/src/view.c index cf96cb517..bf08ae63f 100644 --- a/src/view.c +++ b/src/view.c @@ -1548,12 +1548,16 @@ e_view_handle_fs_restart(void *data) v->geom_get.h = efsd_get_metadata(e_fs_get_connection(), "/view/h", v->dir, EFSD_INT); } - v->monitor_id = efsd_start_monitor(e_fs_get_connection(), v->dir, - efsd_ops(2, - efsd_op_get_stat(), - efsd_op_get_filetype() - ), - TRUE); + { + EfsdOptions *ops; + + ops = efsd_ops(2, efsd_op_get_stat(), efsd_op_get_filetype()); + v->monitor_id = efsd_start_monitor(e_fs_get_connection(), v->dir, + ops, TRUE); + /* FIXME: efsd leaks the ops created by efsd_ops(). */ + /* efsd either need to internally free them or provide a free */ + /* function so the caller app can free them */ + } v->is_listing = 1; } printf("restarted monitor id (connection = %p), %i for %s\n", e_fs_get_connection(), v->monitor_id, v->dir); @@ -2173,13 +2177,16 @@ e_view_set_dir(E_View *v, char *dir) v->geom_get.h = efsd_get_metadata(e_fs_get_connection(), "/view/h", v->dir, EFSD_INT); v->geom_get.busy = 1; - v->monitor_id = efsd_start_monitor(e_fs_get_connection(), v->dir, - efsd_ops(2, - efsd_op_get_stat(), - efsd_op_get_filetype() - ), - TRUE - ); + { + EfsdOptions *ops; + + ops = efsd_ops(2, efsd_op_get_stat(), efsd_op_get_filetype()); + v->monitor_id = efsd_start_monitor(e_fs_get_connection(), v->dir, + ops, TRUE); + /* FIXME: efsd leaks the ops created by efsd_ops(). */ + /* efsd either need to internally free them or provide a free */ + /* function so the caller app can free them */ + } printf("monitor id for %s = %i\n", v->dir, v->monitor_id); v->is_listing = 1; v->changed = 1;