Fix fd leak on dep-list initialization error