lkml.org 
[lkml]   [2019]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3] vt: Fix a missing-check bug in con_init()
From
Date
On 09. 06. 19, 2:15, Nicolas Pitre wrote:
>>>> +fail1:
>>>> + while (currcons > 0) {
>>>> + currcons--;
>>>> + kfree(vc_cons[currcons].d->vc_screenbuf);
>>>> +fail2:
>>>> + kfree(vc_cons[currcons].d);
>>>> + vc_cons[currcons].d = NULL;
>>>> + }
>>
>> Wait, will that even work? You can jump into the middle of a while
>> loop?
>
> Absolutely.

In C99, exceptions are only blocks with variable-sized declarations
(like "int a[b]").

thanks,
--
js
suse labs

\
 
 \ /
  Last update: 2019-06-10 09:11    [W:0.076 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site