Fix try_free command: make addr argument required (#2499)

Fixes the following problem:
```
pwndbg> try_free
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
> /root/pwndbg/pwndbg/commands/heap.py(1195)try_free()
   1194 def try_free(addr: str | int) -> None:
-> 1195     addr = int(addr)
   1196
```
pull/2524/head
Disconnect3d 1 year ago committed by GitHub
parent 3a34bbb6d4
commit a42082b652
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1186,7 +1186,7 @@ def bin_labels_mapping(collections):
try_free_parser = argparse.ArgumentParser(
description="Check what would happen if free was called with given address."
)
try_free_parser.add_argument("addr", nargs="?", help="Address passed to free")
try_free_parser.add_argument("addr", help="Address passed to free")
@pwndbg.commands.ArgparsedCommand(try_free_parser, category=CommandCategory.HEAP)

Loading…
Cancel
Save