[ 
https://issues.apache.org/jira/browse/IMPALA-14443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18020875#comment-18020875
 ] 

ASF subversion and git services commented on IMPALA-14443:
----------------------------------------------------------

Commit 850f2cf3618fe5a667949c445c1fc8a506592a9f in impala's branch 
refs/heads/master from Zoltan Borok-Nagy
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=850f2cf36 ]

IMPALA-14443: Fix potential memory leak in TmpFileMgr

Clang static analyzer found a potential memory leak in
TmpFileMgr. In some cases we forget the deletion of a
newly created TmpFileRemote object. This patch replaces
the raw pointer with a unique_ptr.

Change-Id: I5a516eab1a946e7368c6059f8d1cc430d2ee19e9
Reviewed-on: http://gerrit.cloudera.org:8080/23431
Reviewed-by: Riza Suminto <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> Fix potential memory leak in TmpFileMgr
> ---------------------------------------
>
>                 Key: IMPALA-14443
>                 URL: https://issues.apache.org/jira/browse/IMPALA-14443
>             Project: IMPALA
>          Issue Type: Bug
>            Reporter: Zoltán Borók-Nagy
>            Assignee: Zoltán Borók-Nagy
>            Priority: Major
>
> Clang static analyzer found the following memory leak:
> {noformat}
>   TmpFileRemote* tmp_file_r = new TmpFileRemote(
>       this, dev_id, new_file_path, new_file_path_local, false, dir.c_str());
>   if (tmp_file_r == nullptr) {
>     return Status("Failed to allocate temporary file object.");
>   }
>   if (tmp_file_r->hdfs_conn_ == nullptr) {
>     return Status(Substitute("Failed to connect to FS: $0.", dir)); <=== 
> 'tmp_file_r' never gets deleted.
>   }{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to