]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfsd/auth.c
nfsd: fix null dereference on error path
[linux-2.6-omap-h63xx.git] / fs / nfsd / auth.c
index c903e04aa2171d7f0c42ea7494fe794f6dd9f5f2..b860d3484cd75157c8a652e23047f79fb18f8ba9 100644 (file)
@@ -49,6 +49,8 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp)
                new->fsuid = exp->ex_anon_uid;
                new->fsgid = exp->ex_anon_gid;
                gi = groups_alloc(0);
+               if (!gi)
+                       goto oom;
        } else if (flags & NFSEXP_ROOTSQUASH) {
                if (!new->fsuid)
                        new->fsuid = exp->ex_anon_uid;