[CRIU] [PATCH 2/2] net: Add ip rule save/restore

Kirill Tkhai ktkhai at odin.com
Fri Oct 23 08:59:54 PDT 2015



On 23.10.2015 18:58, Cyrill Gorcunov wrote:
> On Fri, Oct 23, 2015 at 06:49:15PM +0300, Kirill Tkhai wrote:
>>  
>> +static inline int dump_rule(struct cr_imgset *fds)
>> +{
>> +	struct cr_img *img = img_from_set(fds, CR_FD_RULE);
>> +	char *path = strdup(img->path);
>> +
>> +	if (!path)
>> +		return -1;
>> +
> 
> While you're here, xstrdup please, we better yield an error message
> if no memory present.
> 

Good idea, thanks.


More information about the CRIU mailing list