BootAnimation: Avoid memory leak in error case
If we fail preloadZip(), we release the animation prior to returning. Test: TreeHugger Change-Id: I632c052ef22b2a7192b516de5726bf4e74544f7a
This commit is contained in:
@@ -1157,6 +1157,7 @@ BootAnimation::Animation* BootAnimation::loadAnimation(const String8& fn)
|
||||
|
||||
parseAnimationDesc(*animation);
|
||||
if (!preloadZip(*animation)) {
|
||||
releaseAnimation(animation);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user