Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc7c0d6f authored by Yunlian Jiang's avatar Yunlian Jiang Committed by George Burgess IV
Browse files

fix Potential leak of memory pointed to by 'sourcesLiteral'

Bug: none
Test: the warning is gone.
Change-Id: I8fe9610e24e31e3f788d00fa7f594e1274771433
parent 11f51b04
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -383,6 +383,7 @@ status_t RouteTraits::deserialize(_xmlDoc */*doc*/, const _xmlNode *root, PtrEle
            sp<AudioPort> source = ctx->findPortByTagName(String8(devTag));
            if (source == NULL) {
                ALOGE("%s: no source found with name=%s", __FUNCTION__, devTag);
                free(sourcesLiteral);
                return BAD_VALUE;
            }
            sources.add(source);