Fix open/close
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Wed, 8 Dec 2010 15:59:42 +0000 (10:59 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Wed, 8 Dec 2010 15:59:42 +0000 (10:59 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
ltt-debugfs-abi.c

index 6bc94838376d4aa3a9a5203bdbdb33ac097483c0..f9b7e9b014bcf901c81926a372aae88c9986dea3 100644 (file)
@@ -202,7 +202,9 @@ static
 int lttng_session_release(struct inode *inode, struct file *file)
 {
        struct ltt_session *session = file->private_data;
-       ltt_session_destroy(session);
+
+       if (session)
+               ltt_session_destroy(session);
        return 0;
 }
 
@@ -372,7 +374,9 @@ static
 int lttng_channel_release(struct inode *inode, struct file *file)
 {
        struct ltt_channel *channel = file->private_data;
-       fput(channel->session->file);
+
+       if (channel)
+               fput(channel->session->file);
        return 0;
 }
 
@@ -392,7 +396,9 @@ static
 int lttng_event_release(struct inode *inode, struct file *file)
 {
        struct ltt_event *event = file->private_data;
-       fput(event->chan->file);
+
+       if (event)
+               fput(event->chan->file);
        return 0;
 }
 
This page took 0.026467 seconds and 4 git commands to generate.