﻿1
00:00:00,090 --> 00:00:01,750
‫Hello, everybody, welcome back.

2
00:00:02,100 --> 00:00:10,050
‫There's another memory leak we need to fix in Fat 16 Getrude directory that's in Fat 16 Dot s. You'll

3
00:00:10,050 --> 00:00:13,770
‫notice on line two to two, we allocate memory.

4
00:00:14,100 --> 00:00:20,220
‫However, if either of these fail, we just go to out and we don't feed the memory we allocated.

5
00:00:20,610 --> 00:00:21,870
‫So this is a memory leak.

6
00:00:21,870 --> 00:00:22,980
‫It needs to be fixed.

7
00:00:23,460 --> 00:00:26,070
‫Uh, so what we're going to do is we're going to copy this.

8
00:00:26,940 --> 00:00:27,940
‫Change it to die.

9
00:00:27,960 --> 00:00:28,770
‫Die off.

10
00:00:30,590 --> 00:00:33,710
‫We're going to go to the top here and paste that in and just set it to zero

11
00:00:36,380 --> 00:00:42,470
‫like that or know whichever you prefer, and we're just going to scroll down here.

12
00:00:43,830 --> 00:00:44,460
‫And.

13
00:00:45,500 --> 00:00:53,180
‫For any errors now, we're going to go to air out, so it's going to be like that, OK, go to air out,

14
00:00:54,170 --> 00:00:54,890
‫go to air.

15
00:00:55,130 --> 00:00:57,050
‫We haven't created this label yet, guys.

16
00:00:57,440 --> 00:00:59,700
‫Go to air out, OK?

17
00:01:01,080 --> 00:01:06,270
‫And now down here, we're going to go out and we're just going to say if.

18
00:01:08,780 --> 00:01:09,620
‫The directory.

19
00:01:11,330 --> 00:01:16,010
‫Exists, it is no, then we're going to just go free.

20
00:01:17,210 --> 00:01:22,160
‫And once you've done Kay Freedia, we're just going to go into here and we're going to return rest's

21
00:01:22,490 --> 00:01:22,940
‫OK.

22
00:01:24,020 --> 00:01:31,460
‫And another way you could have done it is to check an air code here if the codes below zero and then

23
00:01:31,460 --> 00:01:34,580
‫you could also have done that and return the response.

24
00:01:34,760 --> 00:01:36,560
‫Either one of those will work fine.

25
00:01:36,560 --> 00:01:37,920
‫So I'll let you take your pick.

26
00:01:37,940 --> 00:01:39,250
‫However this one's OK.

27
00:01:40,280 --> 00:01:42,410
‫So yeah, we have to keep the memory.

28
00:01:43,490 --> 00:01:47,870
‫If there's a problem, we go to air, which will then free the memory and return.

29
00:01:47,980 --> 00:01:48,310
‫OK.

30
00:01:49,760 --> 00:01:58,060
‫So, yeah, that should fix that memory, Nick, let's just go and do a clean bill to the stage.

31
00:02:04,270 --> 00:02:06,490
‫Keep in mind, we're going to run Kumu.

32
00:02:08,930 --> 00:02:10,790
‫And we can see everything still works.

33
00:02:11,150 --> 00:02:12,530
‫So that's all good guys.

34
00:02:13,400 --> 00:02:14,200
‫That's no problem.

35
00:02:14,210 --> 00:02:15,890
‫We've now fixed another leak.

36
00:02:16,280 --> 00:02:17,150
‫Thanks for watching.

