Yup, it doesn't ref count the argument. So, I think, the newly created CDynamicObjectArray was never destroyed in the earlier case. Hence the leak!
Whats weird is that I fixed leak before as well (using valgrind differently actually), but this didn't show up then. I checked using the command which was pointed out by Thoralf and this showed up.