parsav  Check-in [4ce1aab090]

Overview
Comment:fix more dumb leaks
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4ce1aab0907b1fab85f08bfb73315eeded6aaec6551613eab6449f2dd9a9ff77
User & Date: lexi on 2021-01-28 02:50:51
Other Links: manifest | tags
Context
2021-01-29
21:14
rip out json-c, replace with mjson check-in: afae276b2f user: lexi tags: trunk
2021-01-28
02:50
fix more dumb leaks check-in: 4ce1aab090 user: lexi tags: trunk
02:44
add in a bunch of missing pqclears, because i am a *retard*, and wipe out a fuckton of memory leaks check-in: a4e71fdfda user: lexi tags: trunk
Changes

Modified render/conf/users.t from [8a313a02c7] to [989226adbe].

   362    362   			if mode == i then
   363    363   				ulst:lpush('<strong>'):ppush(modes[i]):lpush('</strong>')
   364    364   			else
   365    365   				ulst:lpush('<a href="?show='):ppush(modes[i]):lpush('">')
   366    366   					:ppush(modes[i]):lpush('</a>')
   367    367   			end
   368    368   		end
   369         -		var users: lib.mem.lstptr(lib.store.actor)
          369  +		var users: lib.mem.lstptr(lib.store.actor) defer users:free()
   370    370   		if mode == mode_local then
   371    371   			users = co.srv:actor_enum_local()
   372    372   		else
   373    373   			users = co.srv:actor_enum()
   374    374   		end
   375    375   		ulst:lpush('</em></div>')
   376    376   		ulst:lpush('<ul class="directory">')
................................................................................
   391    391   				lib.render.nym(usr, 0, &ulst, false)
   392    392   				ulst:lpush('</a></li>')
   393    393   			else
   394    394   				ulst:lpush('<span class="id">')
   395    395   				lib.render.nym(usr, 0, &ulst, false)
   396    396   				ulst:lpush('</span></li>')
   397    397   			end
   398         -		::skip::end
          398  +		::skip:: users(i):free() end
   399    399   		ulst:lpush('</ul>')
   400    400   
   401    401   		if co.who.rights.powers.invite() or co.who.rights.invites > 0 then
   402    402   			ulst:lpush('<details><summary>create new user</summary><form method="post"><div class="elem"><label for="handle">handle</label><input type="text" name="handle" id="handle" placeholder="')
   403    403   			suggest_handle(&ulst)
   404    404   			ulst:lpush('"></div><button name="act" value="create">create</button></form></details>')
   405    405   		end

Modified render/media-gallery.t from [880ce531e5] to [3ee85e44c6].

    25     25   		end
    26     26   
    27     27   		if path.ct >= 3 and path(1):cmp('a') then
    28     28   			var id, idok = lib.math.shorthand.parse(path(2).ptr, path(2).ct)
    29     29   			if not idok then goto e404 end
    30     30   			var art = co.srv:artifact_fetch(uid, id)
    31     31   			if not art then goto e404 end
           32  +			defer art:free()
    32     33   			if path.ct == 3 then
    33     34   			-- sniff out the artifact type and display the appropriate viewer
    34     35   				var artid = cs(art(0).url)
    35     36   				var btns: lib.str.acc
    36     37   				if owner then
    37     38   					btns:pcompose(&co.srv.pool,'<a class="neg button" href="',pfx,'/media/a/',artid,'/del">delete</a><a class="button" href="',pfx,'/media/a/',artid,'/edit">alter</a>')
    38     39   				else

Modified srv.t from [1938b717c7] to [d3489f68a4].

   710    710   	lib.net.mg_mgr_free(&self.webmgr)
   711    711   	for i=0,self.sources.ct do var src = self.sources.ptr + i
   712    712   		lib.report('closing data source ', src.id.ptr, '(', src.backend.id, ')')
   713    713   		src:close()
   714    714   	end
   715    715   	self.sources:free()
   716    716   	self.pool:free()
          717  +	self.cfg:free()
   717    718   end
   718    719   
   719    720   terra cfgcache:cfstr(name: pstring)
   720    721   	return self.overlord:conf_get(&self._pool, name)
   721    722   end
   722    723   
   723    724   terra cfgcache:cfint(name: pstring, default: intptr)