You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hawq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/01/04 10:09:39 UTC

[jira] [Commented] (HAWQ-313) Fix dereference pointer before null check

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

ASF GitHub Bot commented on HAWQ-313:
-------------------------------------

GitHub user stanlyxiang opened a pull request:

    https://github.com/apache/incubator-hawq/pull/240

    HAWQ-313. Fix dereference pointer before null check

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/stanlyxiang/incubator-hawq coverity_fix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-hawq/pull/240.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #240
    
----
commit 94c410392ac274a63c825d1f0cdc89c6a35f283a
Author: stanlyxiang <st...@gmail.com>
Date:   2016-01-04T08:59:12Z

    HAWQ-313. Fix dereference pointer before null check

----


> 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)