summaryrefslogtreecommitdiff
path: root/rbutil/sansapatcher/sansaio-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/sansapatcher/sansaio-posix.c')
-rw-r--r--rbutil/sansapatcher/sansaio-posix.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/rbutil/sansapatcher/sansaio-posix.c b/rbutil/sansapatcher/sansaio-posix.c
index d173fbc300..44c4dcc95c 100644
--- a/rbutil/sansapatcher/sansaio-posix.c
+++ b/rbutil/sansapatcher/sansaio-posix.c
@@ -122,6 +122,16 @@ int sansa_alloc_buffer(struct sansa_t *sansa, int bufsize)
122 return 0; 122 return 0;
123} 123}
124 124
125int sansa_dealloc_buffer(struct sansa_t* sansa)
126{
127 if (sansa->sectorbuf == NULL) {
128 return -1;
129 }
130 free(sansa->sectorbuf);
131 sansa->sectorbuf = NULL;
132 return 0;
133}
134
125int sansa_seek(struct sansa_t* sansa, loff_t pos) 135int sansa_seek(struct sansa_t* sansa, loff_t pos)
126{ 136{
127 off_t res; 137 off_t res;