]> arthur.barton.de Git - netatalk.git/commit
Fix adouble refcounting
authorRalph Boehme <sloowfranklin@gmail.com>
Tue, 4 Dec 2012 14:58:51 +0000 (15:58 +0100)
committerFrank Lahm <franklahm@googlemail.com>
Tue, 4 Dec 2012 17:58:22 +0000 (18:58 +0100)
commit1a59f639265e6fc11385a40dcef2a70a53b54954
tree341a4079a62fda5c43efd41adfeedb4043a7b59c
parent815ef35acb8a352e4572e1d524a9d404d10a3f70
Fix adouble refcounting

Opening a file that doesn't have metadata with ADFLAGS_HF | AFFLAGS_NOHF
resulted in a successfull open (the error from the failed opening
of the nonexistent metadata is suppressed by AFFLAGS_NOHF), but
then the metadata refcount was increased becasue the error condition
was already reset to 0 at the place where we checked it.
Fixing this requires pushing the refcount increment deeper down the stack
into the individual functions where the error condition is still
available.

After fixing this, another bug became apparent in the mostyl empty
function ad_open_rf_v2().

Also fix an if check where what should be a comparison clobbered
a struct field.
libatalk/adouble/ad_flush.c
libatalk/adouble/ad_open.c