Fix a double-free issue in CFX_PathData::~CFX_PathData
authorJun Fang <jun_fang@foxitsoftware.com>
Mon, 18 Aug 2014 19:21:44 +0000 (12:21 -0700)
committerJun Fang <jun_fang@foxitsoftware.com>
Mon, 18 Aug 2014 19:21:44 +0000 (12:21 -0700)
In CPDFSDK_InterForm::SubmitFields, the buffer pointed by m_pBuffer is returned
and released by the caller. However, it will be released again in the destructor.

BUG=401580
R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/481733002

fpdfsdk/src/fsdk_baseform.cpp

index ae3b636..aa87dd5 100644 (file)
@@ -2284,12 +2284,6 @@ FX_BOOL CPDFSDK_InterForm::SubmitFields(const CFX_WideString& csDestination, con
 
        pEnv->JS_docSubmitForm(pBuffer, nBufSize, (FX_LPCWSTR)csDestination);
        
-       if (bUrlEncoded && pBuffer)
-       {
-               FX_Free(pBuffer);
-               pBuffer = NULL; 
-       }
-
        return TRUE;
 }