Use ADDREF instead of DUP, it must be enough.