[
https://issues.apache.org/jira/browse/HAWQ-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15082356#comment-15082356
]
ASF GitHub Bot commented on HAWQ-313:
-------------------------------------
Github user stanlyxiang closed the pull request at:
https://github.com/apache/incubator-hawq/pull/240
> Fix dereference pointer before null check
> -----------------------------------------
>
> Key: HAWQ-313
> URL: https://issues.apache.org/jira/browse/HAWQ-313
> Project: Apache HAWQ
> Issue Type: Improvement
> Reporter: Xiang Sheng
> Assignee: Lei Chang
>
> In the newly added udf, there is a dereference pointer before null check. we
> should fix it.
> In file apache-hawq/src/backend/cdb/cdbmetadatacache.c: 1437
> MetadataCacheEntry *entry = (MetadataCacheEntry *)hash_search(MetadataCache,
> (void *)&key, HASH_ENTER_NULL, &found);
> entry->file_size = 134217728;
> entry->block_num = 1;
> AllocMetadataBlock(entry->block_num, &entry->first_block_id,
> &entry->last_block_id);
> if(entry != NULL)
> {
> current++;
> success++;
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)