]> arthur.barton.de Git - netatalk.git/commitdiff
afpd/file: fix memory leak
authorRiccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Mon, 11 Feb 2013 21:03:26 +0000 (22:03 +0100)
committerRiccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Mon, 11 Feb 2013 21:03:26 +0000 (22:03 +0100)
Reported by Coverity as CID #201194.

etc/afpd/file.c

index 153f1325a2641bd021ace0401285f49966f3b112..e48afe213896e67c0595bad9027b2d647b688c6e 100644 (file)
@@ -335,6 +335,7 @@ int getmetadata(const AFPObj *obj,
                     || (bconchar(fullpath, '/') != BSTR_OK)
                     || (bcatcstr(fullpath, upath)) != BSTR_OK) {
                     LOG(log_error, logtype_afpd, "getmetadata: fullpath: %s", strerror(errno));
+                    bdestroy(fullpath);
                     return AFPERR_MISC;
                 }