The corresponding code in ad_open_hf_ea() [ https://github.com/Netatalk/Netatalk/blob/master/libatalk/adouble/ad_open.c#L1204 ] does not increase the refcount.  Since this problem is not seen by users of appledouble = ea, I think this is the correct fix.

Also I have been running netatalk with this patch since last night I have have not seen any problems.