summaryrefslogtreecommitdiff
path: root/procfs_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'procfs_file.c')
-rw-r--r--procfs_file.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/procfs_file.c b/procfs_file.c
index 62419ee..cb0488e 100644
--- a/procfs_file.c
+++ b/procfs_file.c
@@ -40,7 +40,6 @@ procfs_file_make_node (void *contents, ssize_t len, void (*cleanup)(void *))
.cleanup = procfs_file_cleanup,
};
struct procfs_file *f;
- struct node *np;
f = malloc (sizeof *f);
if (! f)
@@ -50,10 +49,6 @@ procfs_file_make_node (void *contents, ssize_t len, void (*cleanup)(void *))
f->len = (len >= 0) ? len : strlen (f->contents);
f->cleanup = cleanup;
- np = procfs_make_node (&ops, f);
- if (! np)
- free (f);
-
- return np;
+ return procfs_make_node (&ops, f);
}