Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Issue 21347002: Add missing free for the allocated memory from vasprintf(). (Closed)

Created:
7 years, 4 months ago by byungwoo
Modified:
7 years, 4 months ago
Reviewers:
Hajime Morrita
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Add missing free for the allocated memory from vasprintf(). The XMLDocumentParser::error() returns without deleting the allocated memory from vasprintf() and this can make memory leak. To prevent the memory leak, free the memory before return. BUG=21347002 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=155304

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -0 lines) Patch
M Source/core/xml/parser/XMLDocumentParser.cpp View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Hajime Morrita
This doesn't leak. the array is stack allocated object.
7 years, 4 months ago (2013-08-01 01:33:34 UTC) #1
Hajime Morrita
vivekg pointed out that #if HAVE(VASPRINTF) path allocates it. That's right. lgtm.
7 years, 4 months ago (2013-08-01 01:41:45 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bw80.lee@samsung.com/21347002/1
7 years, 4 months ago (2013-08-01 01:42:06 UTC) #3
commit-bot: I haz the power
7 years, 4 months ago (2013-08-01 04:43:59 UTC) #4
Message was sent while issue was closed.
Change committed as 155304

Powered by Google App Engine
This is Rietveld 408576698