From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Roman Khabibov <roman.habibov@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 1/2] box: introduce constraint names hash table
Date: Tue, 12 Nov 2019 17:17:25 +0300 [thread overview]
Message-ID: <20191112141725.GC5130@uranus> (raw)
In-Reply-To: <49805fa2211dfa3e5d92a34a740a3f9cf488c327.1573566885.git.roman.habibov@tarantool.org>
On Tue, Nov 12, 2019 at 05:02:58PM +0300, Roman Khabibov wrote:
> +
> +int
> +space_put_constraint_name(struct space *space, const char *name)
> +{
> + uint32_t len = strlen(name);
> + uint32_t hash = mh_strn_hash(name, len);
> + char *name_copy = malloc(len);
> + memcpy(name_copy, name, len);
What if malloc failed here?
next prev parent reply other threads:[~2019-11-12 14:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-12 14:02 [Tarantool-patches] [PATCH 0/2] Add constraint names hash table to space Roman Khabibov
2019-11-12 14:02 ` [Tarantool-patches] [PATCH 1/2] box: introduce constraint names hash table Roman Khabibov
2019-11-12 14:17 ` Cyrill Gorcunov [this message]
2019-11-12 22:30 ` Roman Khabibov
2019-11-12 23:04 ` Vladislav Shpilevoy
2019-11-12 14:02 ` [Tarantool-patches] [PATCH 2/2] sql: make constraint operations transactional Roman Khabibov
2019-11-12 23:04 ` Vladislav Shpilevoy
2019-11-12 23:04 ` [Tarantool-patches] [PATCH 0/2] Add constraint names hash table to space Vladislav Shpilevoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191112141725.GC5130@uranus \
--to=gorcunov@gmail.com \
--cc=roman.habibov@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 1/2] box: introduce constraint names hash table' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox