summaryrefslogtreecommitdiff
path: root/libnetfs/priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'libnetfs/priv.h')
-rw-r--r--libnetfs/priv.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libnetfs/priv.h b/libnetfs/priv.h
index eefb8e7f..5afbae7f 100644
--- a/libnetfs/priv.h
+++ b/libnetfs/priv.h
@@ -31,5 +31,6 @@ begin_using_protid_port (file_t port)
extern inline void
end_using_protid_port (struct protid *cred)
{
- ports_port_deref (cred);
+ if (cred)
+ ports_port_deref (cred);
}