Re: [PATCH 2/2 libnftnl] Check memory allocations in setters

2016-06-10 Thread Pablo Neira Ayuso
On Fri, Jun 10, 2016 at 12:20:54PM +0200, Carlos Falgueras García wrote: > When you set an object attribute the memory is copied, sometimes an > allocations is needed and it must be checked. Before this patch all setters > method return void, so this patch makes all setters return int instead void

[PATCH 2/2 libnftnl] Check memory allocations in setters

2016-06-10 Thread Carlos Falgueras García
When you set an object attribute the memory is copied, sometimes an allocations is needed and it must be checked. Before this patch all setters method return void, so this patch makes all setters return int instead void to communicate the error to user. Summary: * All setters return int

Re: [PATCH 2/2,libnftnl] Check memory allocations in setters

2016-06-02 Thread Pablo Neira Ayuso
On Thu, Jun 02, 2016 at 12:40:24PM +0200, Carlos Falgueras García wrote: > When you set an object attribute the memory is copied, sometimes an > allocations is needed and it must be checked. By now all setters methods > returns void, so the policy adopted in case of error is keep the object >

[PATCH 2/2,libnftnl] Check memory allocations in setters

2016-06-02 Thread Carlos Falgueras García
When you set an object attribute the memory is copied, sometimes an allocations is needed and it must be checked. By now all setters methods returns void, so the policy adopted in case of error is keep the object unchanged. What this patch makes: * All memory allocations inside setters